]> code.delx.au - gnu-emacs/blobdiff - lisp/hexl.el
eldoc: modify `eldoc-documentation-function' using `add-function'
[gnu-emacs] / lisp / hexl.el
index 3751bcf4bb31ae65795c6a4f297e5a02b45cb5d9..27d465926989e6f5e4e8d4ffaec076fd394c1db3 100644 (file)
@@ -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")