Compare commits

...

6 Commits

Author SHA1 Message Date
64b5310853
Remove obsolete usage of semantic-mode
I have only used it for imenu support in Org mode and init.el, but this seems to
work without semantic as well.
2022-05-22 18:09:31 +02:00
b9d991425f
Remove obsolete references to pdf-tools
org-ref-pdf references pdf-tools, but I do not use it anyway anymore.
2022-05-22 18:04:15 +02:00
aaa9e33801
Remove obsolete eyebrowse package 2022-05-22 17:56:35 +02:00
b9cf1441dd
Remove obsolete configuration for ox-latex
Not using it anymore.
2022-05-22 17:40:01 +02:00
152c17643a
Always use #' for lambda
Current exception: not in backtick expansions.  Is it necessary there?
2022-05-22 17:37:33 +02:00
fa7c7ca3ed
Remove possibly obsolete Org mode fix 2022-05-22 17:20:19 +02:00

162
init.el
View File

@ -125,7 +125,6 @@
eyebrowse-mode
projectile-mode
yas-global-mode
semantic-mode
global-git-commit-mode))
(with-demoted-errors "Cannot activate mode: %s"
(funcall mode +1)))
@ -920,24 +919,7 @@
(unless (memq #'org-clock-save
(mapcar #'timer--function timer-list))
(run-with-timer 0 3600 #'org-clock-save))
;; Hack: The default implementation is too slow, because it is
;; parsing all properties of an entry by default. Lets simplify
;; this to only parse what we are looking for. This makes tag
;; search *much* faster!
(with-eval-after-load 'org
(defun org-cached-entry-get (pom property)
(if (or (eq t org-use-property-inheritance)
(and (stringp org-use-property-inheritance)
(let ((case-fold-search t))
(string-match-p org-use-property-inheritance property)))
(and (listp org-use-property-inheritance)
(member-ignore-case property org-use-property-inheritance)))
;; Caching is not possible, check it directly.
(org-entry-get pom property 'inherit)
;; This is different in the original implementation
(org-entry-get pom property))))))
(run-with-timer 0 3600 #'org-clock-save))))
;; Drag-and-Drop images into org-mode buffer
(use-package org-download
@ -972,7 +954,7 @@
org-clock-auto-clock-resolution 'when-no-clock-is-running
org-clock-mode-line-total 'auto
org-clock-report-include-clocking-task t
org-clock-in-switch-to-state (lambda (_)
org-clock-in-switch-to-state #'(lambda (_)
(when (not
(and (boundp 'org-capture-mode)
org-capture-mode))
@ -1294,60 +1276,6 @@
(require 'ox-md)
(require 'ox-pandoc)))
(use-package ox-latex
:init (setq org-latex-default-class "scrartcl"
org-latex-listings t
org-latex-compiler "lualatex")
:config (progn
(add-to-list 'org-latex-classes
`("scrartcl"
,(concat "\\documentclass[parskip=half,colorlinks]{scrartcl}\n"
"[DEFAULT-PACKAGES]"
"[PACKAGES]"
"
\\lstset{
basewidth=0.5em,
keywordstyle=\\textcolor{blue!80!white},
basicstyle=\\ttfamily,
commentstyle={\\itshape},
frame=tb,
showspaces=false,
showtabs=false,
showstringspaces=false,
}
"
"[EXTRA]\n")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-latex-classes
`("beamer"
,(concat "\\documentclass[presentation]{beamer}\n"
"[DEFAULT-PACKAGES]"
"[PACKAGES]"
"
\\lstset{
basewidth=0.5em,
keywordstyle=\\textcolor{blue!80!white},
basicstyle=\\ttfamily,
commentstyle={\\itshape},
frame=tb,
showspaces=false,
showtabs=false,
showstringspaces=false,
}
"
"[EXTRA]\n")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
(add-to-list 'org-latex-packages-alist
'("" "listings"))
(add-to-list 'org-latex-packages-alist
'("" "xcolor"))))
(use-package ox-html
:init (setq org-html-postamble nil))
@ -1387,11 +1315,6 @@
(("C-c n l" . org-roam-buffer-toggle)
("C-c n g" . org-roam-graph))))
(use-package org-ref
:config (progn
(require 'org-ref-pdf)
(require 'org-ref-url-utils)))
;; * General Programming
@ -1402,7 +1325,7 @@
ediff-show-clashes-only t)
:config (progn
(add-hook 'ediff-keymap-setup-hook
'(lambda ()
#'(lambda ()
(bind-key "j" #'ediff-next-difference ediff-mode-map)
(bind-key "k" #'ediff-previous-difference ediff-mode-map)))
@ -1465,30 +1388,6 @@
:commands (page-break-lines-mode)
:diminish page-break-lines-mode)
(use-package semantic
:commands (semantic-mode)
:init (progn
(setq semantic-default-submodes
'(global-semantic-idle-scheduler-mode
global-semanticdb-minor-mode))
;; Disable global key bindings as we are not using them;
;; cf. https://emacs.stackexchange.com/questions/32389/how-do-you-disable-all-keybinding-for-a-package
(setq semantic-mode-map (make-sparse-keymap)))
:config (progn
(require 'semantic/ia)
(require 'semantic/bovine/el)
;; recognize `use-package' as include statement; the function seems
;; to have to be a byte-compiled function, for otherwise it just
;; wont work … ?
(eval `(semantic-elisp-setup-form-parser
,(lambda (form start end)
(ignore start end)
(semantic-tag-new-include (symbol-name (nth 1 form))
nil))
use-package))))
(use-package flycheck
:ensure t
:commands (global-flycheck-mode flycheck-mode)
@ -1597,7 +1496,7 @@
"User-Agent:"))
message-citation-line-function
(lambda ()
#'(lambda ()
(when message-reply-headers
(insert "ghItlhpu' "
(mail-header-from message-reply-headers)
@ -1891,7 +1790,7 @@
;; Visit group under point and immediately close it; this updates
;; gnus registry as a side-effect
(bind-key "v u"
'(lambda ()
#'(lambda ()
(interactive)
(save-mark-and-excursion
(when (gnus-topic-select-group)
@ -1900,7 +1799,7 @@
;; Toggle visibility of News group
(bind-key "v c"
(lambda ()
#'(lambda ()
(interactive)
(save-mark-and-excursion
(gnus-topic-jump-to-topic "News")
@ -2106,7 +2005,7 @@
(ediff-files file2 file1)
(ediff-files file1 file2))
(add-hook 'ediff-after-quit-hook-internal
(lambda ()
#'(lambda ()
(setq ediff-after-quit-hook-internal nil)
(set-window-configuration wnd))))
(error "No more than 2 files should be marked"))))
@ -2380,11 +2279,6 @@ With given ARG, display files in `db/important-document-path."
imenu-use-popup-menu nil
imenu-eager-completion-buffer t))
(use-package eyebrowse
:ensure t
:commands (eyebrowse-mode)
:init (setq eyebrowse-keymap-prefix (kbd "C-c w")))
(use-package goto-last-change
:commands goto-last-change)
@ -2468,7 +2362,7 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'emms-player-started-hook 'emms-show)
(advice-add 'emms-tag-editor-submit
:after (lambda (&rest r)
:after #'(lambda (&rest r)
(ignore r)
(delete-window)))
@ -2480,7 +2374,7 @@ With given ARG, display files in `db/important-document-path."
;; no matter what previous values or customization may say otherwise
;; … so we need to employ a hook to change its value
(add-hook 'emms-playlist-mode-hook
(lambda ()
#'(lambda ()
(setq emms-playlist-insert-track-function
#'db/emms-playlist-mode-insert-track)))
@ -2538,7 +2432,7 @@ With given ARG, display files in `db/important-document-path."
:init (setq explicit-shell-file-name "/bin/bash")
:config (progn
(add-hook 'term-exec-hook ; oremacs.com
(lambda ()
#'(lambda ()
(let* ((buff (current-buffer))
(proc (get-buffer-process buff)))
(set-process-sentinel
@ -2563,7 +2457,7 @@ With given ARG, display files in `db/important-document-path."
(unbind-key "C-x C-j" term-raw-map)
(unbind-key "C-x g" term-raw-map))
(add-hook 'term-mode-hook (lambda () (yas-minor-mode -1)))))
(add-hook 'term-mode-hook #'(lambda () (yas-minor-mode -1)))))
(use-package ansi-color
:commands (ansi-color-for-comint-mode-on
@ -2594,7 +2488,7 @@ With given ARG, display files in `db/important-document-path."
;; stick to that.
(add-hook 'shell-mode-hook
(lambda ()
#'(lambda ()
(setq-local completion-in-region-function
#'completion--in-region)))))
@ -2639,7 +2533,7 @@ With given ARG, display files in `db/important-document-path."
(if (<= emacs-major-version 27)
(add-hook 'eshell-mode-hook
(lambda ()
#'(lambda ()
(bind-key "C-a" #'eshell-bol eshell-mode-map)
(bind-key "M-r" #'eshell-insert-history eshell-mode-map)
(bind-key "M-P" #'eshell-previous-prompt eshell-mode-map)
@ -2662,7 +2556,7 @@ With given ARG, display files in `db/important-document-path."
;; `pcomplete-ignore-case is non-nil by default.
(when on-windows
(add-to-list 'eshell-mode-hook
(lambda ()
#'(lambda ()
(setq pcomplete-ignore-case nil))))
;; Sometimes, when completing path names and immediately
@ -2784,7 +2678,7 @@ With given ARG, display files in `db/important-document-path."
(ccl ("ccl") :coding-system utf-8-unix))
slime-repl-history-remove-duplicates t
slime-repl-history-trim-whitespaces t)
(add-hook 'lisp-mode-hook '(lambda () (slime-mode +1)) t))
(add-hook 'lisp-mode-hook #'(lambda () (slime-mode +1)) t))
:config (progn
(make-directory "/tmp/slime-fasls/" t)
(slime-setup '(slime-repl slime-fancy slime-autodoc))
@ -2850,7 +2744,7 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
(add-hook 'latex-mode-hook #'turn-on-reftex)
(add-hook 'LaTeX-mode-hook '(lambda ()
(add-hook 'LaTeX-mode-hook #'(lambda ()
(TeX-PDF-mode 1)
(TeX-source-correlate-mode 1)
(TeX-fold-mode 1)))
@ -2859,17 +2753,11 @@ With given ARG, display files in `db/important-document-path."
(add-to-list 'TeX-view-program-selection
'(output-pdf "Evince"))
;; use pdf-tools when loaded
(with-eval-after-load 'pdf-tools
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
(add-to-list 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer))
;; style used for my personal definitions; not clear whether this
;; works as intended
(TeX-add-style-hook
"mydefs"
(lambda ()
#'(lambda ()
(TeX-run-style-hooks "etex"
"etoolbox"
"ifthen"
@ -2924,7 +2812,7 @@ With given ARG, display files in `db/important-document-path."
;; whether this works as intended
(TeX-add-style-hook
"cleveref"
(lambda ()
#'(lambda ()
(add-to-list 'reftex-ref-style-alist
'("Cleveref" "cleveref"
(("\\cref" ?c) ("\\Cref" ?C)
@ -2938,11 +2826,11 @@ With given ARG, display files in `db/important-document-path."
;; Language definitions
(add-hook 'TeX-language-de-hook
(lambda () (ispell-change-dictionary "de_DE")))
#'(lambda () (ispell-change-dictionary "de_DE")))
(add-hook 'TeX-language-en-hook
(lambda () (ispell-change-dictionary "en_US")))
#'(lambda () (ispell-change-dictionary "en_US")))
(add-hook 'TeX-mode-hook
(lambda () (setq ispell-parser 'tex)))))
#'(lambda () (setq ispell-parser 'tex)))))
;; * Various Mode Configurations
@ -2956,7 +2844,7 @@ With given ARG, display files in `db/important-document-path."
:init (progn
;; replace perl-mode with cperl-mode
(mapc
(lambda (pair)
#'(lambda (pair)
(if (eq (cdr pair) 'perl-mode)
(setcdr pair 'cperl-mode)))
(append auto-mode-alist interpreter-mode-alist))
@ -2999,7 +2887,7 @@ With given ARG, display files in `db/important-document-path."
(message "Loaded eproject … done")
(with-eval-after-load 'message
(add-hook 'message-setup-hook
(lambda ()
#'(lambda ()
(eproject-mode -1))))))
(use-package eww
@ -3011,8 +2899,8 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook
(lambda ()
(company-mode +1)
#'(lambda ()
(company-mode 1)
(set (make-local-variable 'company-backends)
(append '((company-capf company-dabbrev-code))
company-backends))))