diff options
author | John Paul Wallington <jpw@pobox.com> | 2008-04-26 17:09:02 +0000 |
---|---|---|
committer | John Paul Wallington <jpw@pobox.com> | 2008-04-26 17:09:02 +0000 |
commit | cfea581fe4fca032280814c0b08a937d64cf1af2 (patch) | |
tree | d4c92f173c0be09d33a6fca87fb43d725a208668 /lisp/hexl.el | |
parent | 713a5a472965ab143979cdce861e80e57042a324 (diff) | |
download | emacs-cfea581fe4fca032280814c0b08a937d64cf1af2.tar.gz |
(hexl-mode): Stash `eldoc-documentation-function' in
`hexl-mode-old-eldoc-documentation-function'.
(hexl-mode-exit): Restore it.
(hexl-mode-old-eldoc-documentation-function): Declare for compiler.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r-- | lisp/hexl.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index c0ec9aa6ed8..245f895837e 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -120,6 +120,7 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." (defvar hexl-mode-old-require-final-newline) (defvar hexl-mode-old-syntax-table) (defvar hexl-mode-old-font-lock-keywords) +(defvar hexl-mode-old-eldoc-documentation-function) (defvar hexl-ascii-overlay nil "Overlay used to highlight ASCII element corresponding to current point.") @@ -288,6 +289,10 @@ 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. + (make-local-variable 'hexl-mode-old-eldoc-documentation-function) + (setq hexl-mode-old-eldoc-documentation-function + (bound-and-true-p eldoc-documentation-function)) + (set (make-local-variable 'eldoc-documentation-function) 'hexl-print-current-point-info) (eldoc-add-command-completions "hexl-") @@ -405,6 +410,10 @@ With arg, don't unhexlify buffer." (when (boundp 'hexl-mode-old-hl-line-face) (setq hl-line-face hexl-mode-old-hl-line-face)) + (when (boundp 'hexl-mode-old-eldoc-documentation-function) + (setq eldoc-documentation-function + hexl-mode-old-eldoc-documentation-function)) + (setq require-final-newline hexl-mode-old-require-final-newline) (setq mode-name hexl-mode-old-mode-name) (setq isearch-search-fun-function hexl-mode-old-isearch-search-fun-function) |