summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2014-12-05 19:34:42 +0100
committerMichal Nazarewicz <mina86@mina86.com>2015-01-20 15:04:15 +0100
commitfd020a29316e573e96501dfc1c87d05085160b2c (patch)
tree7e7eaf479ef8f2036c9fd5bf85bf60963d646460 /lisp/hexl.el
parent81681ed9a1e609101377d674613832008a667587 (diff)
downloademacs-fd020a29316e573e96501dfc1c87d05085160b2c.tar.gz
emacs-fd020a29316e573e96501dfc1c87d05085160b2c.tar.bz2
emacs-fd020a29316e573e96501dfc1c87d05085160b2c.zip
eldoc: modify `eldoc-documentation-function' using `add-function'
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Describe how major modes should use `add-function' to alter value of the variable. * lisp/hexl.el (hexl-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/ielm.el (inferior-emacs-lisp-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/progmodes/cfengine.el (cfengine3-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/progmodes/elisp-mode (emacs-lisp-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/progmodes/octave.el (octave-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/progmodes/python.el (python-mode): Set `eldoc-documentation-function' using `add-function' so the default value is always used. * lisp/simple.el (read--expression): Set `eldoc-documentation-function' using `add-function' so the default value is always used.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 3751bcf4bb3..27d46592698 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -395,8 +395,8 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode.
(add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer nil t)
;; Set a callback function for eldoc.
- (hexl-mode--setq-local 'eldoc-documentation-function
- #'hexl-print-current-point-info)
+ (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")