(add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)
;; Set a callback function for eldoc.
- (add-hook 'eldoc-documentation-functions
- #'hexl-print-current-point-info nil t)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'hexl-print-current-point-info)
(eldoc-add-command-completions "hexl-")
(eldoc-remove-command "hexl-save-buffer"
"hexl-current-address")
(set (make-local-variable 'completion-at-point-functions)
'(comint-replace-by-expanded-history
ielm-complete-filename elisp-completion-at-point))
- (add-hook 'eldoc-documentation-functions
- #'elisp-eldoc-documentation-function nil t)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'elisp-eldoc-documentation-function)
(set (make-local-variable 'ielm-prompt-internal) ielm-prompt)
(set (make-local-variable 'comint-prompt-read-only) ielm-prompt-read-only)
(setq comint-get-old-input 'ielm-get-old-input)
(when buffer-file-name
(shell-quote-argument buffer-file-name)))))
- (if (boundp 'eldoc-documentation-functions)
- (add-hook 'eldoc-documentation-functions
- #'cfengine3-documentation-function nil t)
- ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to
- ;; nil.
- (or eldoc-documentation-function
- (setq-local eldoc-documentation-function #'ignore))
- (add-function :before-until (local 'eldoc-documentation-function)
- #'cfengine3-documentation-function))
+ ;; For emacs < 25.1 where `eldoc-documentation-function' defaults to
+ ;; nil.
+ (or eldoc-documentation-function
+ (setq-local eldoc-documentation-function #'ignore))
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'cfengine3-documentation-function)
(add-hook 'completion-at-point-functions
#'cfengine3-completion-function nil t)
(append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
(setq-local electric-quote-string t)
(setq imenu-case-fold-search nil)
- (add-hook 'eldoc-documentation-functions
- #'elisp-eldoc-documentation-function nil t)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'elisp-eldoc-documentation-function)
(add-hook 'xref-backend-functions #'elisp--xref-backend nil t)
(setq-local project-vc-external-roots-function #'elisp-load-path-roots)
(add-hook 'completion-at-point-functions
(add-hook 'before-save-hook 'octave-sync-function-file-names nil t)
(setq-local beginning-of-defun-function 'octave-beginning-of-defun)
(and octave-font-lock-texinfo-comment (octave-font-lock-texinfo-comment))
- (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ 'octave-eldoc-function)
(easy-menu-add octave-mode-menu))
(setq font-lock-defaults '(inferior-octave-font-lock-keywords nil nil))
(setq-local info-lookup-mode 'octave-mode)
- (add-hook 'eldoc-documentation-functions 'octave-eldoc-function nil t)
+ (setq-local eldoc-documentation-function 'octave-eldoc-function)
(setq-local comint-input-ring-file-name
(or (getenv "OCTAVE_HISTFILE") "~/.octave_hist"))
(current-column))))
(^ '(- (1+ (current-indentation))))))
- (if (boundp 'eldoc-documentation-functions)
- (add-hook 'eldoc-documentation-functions #'python-eldoc-function nil t)
- (if (null eldoc-documentation-function)
- ;; Emacs<25
- (set (make-local-variable 'eldoc-documentation-function)
- #'python-eldoc-function)
- (add-function :before-until (local 'eldoc-documentation-function)
- #'python-eldoc-function)))
+ (if (null eldoc-documentation-function)
+ ;; Emacs<25
+ (set (make-local-variable 'eldoc-documentation-function)
+ #'python-eldoc-function)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'python-eldoc-function))
(add-to-list
'hs-special-modes-alist
(minibuffer-with-setup-hook
(lambda ()
;; FIXME: call emacs-lisp-mode?
- (add-hook 'eldoc-documentation-functions
- #'elisp-eldoc-documentation-function nil t)
+ (add-function :before-until (local 'eldoc-documentation-function)
+ #'elisp-eldoc-documentation-function)
(add-hook 'completion-at-point-functions
#'elisp-completion-at-point nil t)
(run-hooks 'eval-expression-minibuffer-setup-hook))