Emacs: Replace eval-after-load with with-eval-after-load
parent
8f8578db06
commit
581d7799d5
|
@ -212,15 +212,14 @@
|
|||
|
||||
;; Compilation bindings and conveniences.
|
||||
(setq compilation-ask-about-save nil)
|
||||
(eval-after-load 'compile
|
||||
'(progn (make-variable-buffer-local 'compile-command)
|
||||
(with-eval-after-load 'compile
|
||||
;; Making `compilation-directory' local only works with `recompile'
|
||||
;; and if `compile' is never used. In such a scenario,
|
||||
;; `compile-command' is not saved by `recompile' itself which adds a
|
||||
;; lot of bookkeeping.
|
||||
; (make-variable-buffer-local 'compilation-directory)
|
||||
; (make-variable-buffer-local 'compile-history)
|
||||
))
|
||||
;; (make-variable-buffer-local 'compilation-directory)
|
||||
;; (make-variable-buffer-local 'compile-history)
|
||||
(make-variable-buffer-local 'compile-command))
|
||||
;; Don't set these bindings in mickey as we might have to override them from
|
||||
;; mode hooks.
|
||||
(global-set-key (kbd "C-<f10>") 'compile)
|
||||
|
@ -257,8 +256,8 @@
|
|||
(add-to-list 'desktop-locals-to-save 'compile-command))
|
||||
|
||||
;; GMP documentation
|
||||
(eval-after-load "info-look"
|
||||
'(let ((mode-value (assoc 'c-mode (assoc 'symbol info-lookup-alist))))
|
||||
(with-eval-after-load "info-look"
|
||||
(let ((mode-value (assoc 'c-mode (assoc 'symbol info-lookup-alist))))
|
||||
(setcar (nthcdr 3 mode-value)
|
||||
(cons '("(gmp)Function Index" nil "^ -.* " "\\>")
|
||||
(nth 3 mode-value)))))
|
||||
|
|
|
@ -23,15 +23,14 @@
|
|||
;; If the prompt spans over multiple lines, the regexp should match last line only.
|
||||
(setq eshell-prompt-regexp "^[#>] ")
|
||||
|
||||
(eval-after-load 'em-term
|
||||
'(nconc eshell-visual-commands
|
||||
(with-eval-after-load 'em-term
|
||||
(nconc eshell-visual-commands
|
||||
'("abook" "cmus" "fzf" "htop" "mpv" "mutt" "ncdu" "newsbeuter" "ranger")))
|
||||
; (eval-after-load 'em-term
|
||||
; '(add-to-list 'eshell-visual-subcommands '("git" "log" "diff" "show")))
|
||||
;; (with-eval-after-load 'em-term
|
||||
;; (add-to-list 'eshell-visual-subcommands '("git" "log" "diff" "show")))
|
||||
|
||||
;; eshell/alias is too slow as it reads and write the file on each definition.
|
||||
(eval-after-load 'em-alias
|
||||
'(progn
|
||||
(with-eval-after-load 'em-alias
|
||||
(eshell-read-aliases-list)
|
||||
(mapc
|
||||
(lambda (alias)
|
||||
|
@ -45,6 +44,6 @@
|
|||
("mkcd" "mkdir -p $* && cd $1")
|
||||
("emacs" "find-file $1")
|
||||
("em" "find-file $1")))
|
||||
(eshell-write-aliases-list)))
|
||||
(eshell-write-aliases-list))
|
||||
|
||||
(provide 'mode-eshell)
|
||||
|
|
|
@ -13,20 +13,18 @@
|
|||
|
||||
;; Agendas.
|
||||
;; If you want to add other agendas in a local file, use the following code:
|
||||
; (eval-after-load "org"
|
||||
; '(progn
|
||||
; (add-to-list 'org-agenda-files "/path/to/agenda.org")))
|
||||
; (with-eval-after-load "org"
|
||||
; (add-to-list 'org-agenda-files "/path/to/agenda.org"))
|
||||
(add-to-list 'org-agenda-files "~/personal/todo/todo.org")
|
||||
|
||||
(setq org-enforce-todo-dependencies t)
|
||||
;; Set PDF association in Org-mode (was Evince by default).
|
||||
(eval-after-load "org"
|
||||
'(progn
|
||||
(with-eval-after-load "org"
|
||||
(setq indent-tab-mode nil) ; Org-mode aligns text.
|
||||
(require 'tool-pdf)
|
||||
;; Change .pdf association directly within the alist
|
||||
(setcdr (assoc "\\.pdf\\'" org-file-apps)
|
||||
(concat pdf-viewer " " (mapconcat 'identity pdf-viewer-args " ")))))
|
||||
(concat pdf-viewer " " (mapconcat 'identity pdf-viewer-args " "))))
|
||||
|
||||
(add-hook-and-eval
|
||||
'org-mode-hook
|
||||
|
|
Loading…
Reference in New Issue