Mercurial > emacs
changeset 58373:0d6b8a784254
(hexl-mode-old-hl-line-mode, hexl-mode-old-ruler-mode): New variables.
(hexl-mode): Set those variables, record ruler-mode and hl-line-mode.
(hexl-mode-exit): Restore status of ruler-mode and hl-line-mode.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 21 Nov 2004 00:38:34 +0000 |
parents | 21ab25d5378c |
children | 388064fea98c |
files | lisp/hexl.el |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/hexl.el Sun Nov 21 00:36:34 2004 +0000 +++ b/lisp/hexl.el Sun Nov 21 00:38:34 2004 +0000 @@ -99,9 +99,15 @@ (defvar hexl-mode-map nil) +(defvar ruler-mode) +(defvar ruler-mode-ruler-function) +(defvar hl-line-mode) + +(defvar hexl-mode-old-hl-line-mode) (defvar hexl-mode-old-local-map) (defvar hexl-mode-old-mode-name) (defvar hexl-mode-old-major-mode) +(defvar hexl-mode-old-ruler-mode) (defvar hexl-mode-old-isearch-search-fun-function) (defvar hexl-mode-old-require-final-newline) (defvar hexl-mode-old-syntax-table) @@ -240,6 +246,14 @@ (setq hexl-mode-old-major-mode major-mode) (setq major-mode 'hexl-mode) + (make-local-variable 'hexl-mode-old-ruler-mode) + (setq hexl-mode-old-ruler-mode + (and (boundp 'ruler-mode) ruler-mode)) + + (make-local-variable 'hexl-mode-old-hl-line-mode) + (setq hexl-mode-old-hl-line-mode + (and (boundp 'hl-line-mode) hl-line-mode)) + (make-local-variable 'hexl-mode-old-syntax-table) (setq hexl-mode-old-syntax-table (syntax-table)) (set-syntax-table (standard-syntax-table)) @@ -353,6 +367,10 @@ (remove-hook 'post-command-hook 'hexl-follow-ascii-find t) (setq hexl-ascii-overlay nil) + (if (and (boundp 'ruler-mode) ruler-mode (not hexl-mode-old-ruler-mode)) + (ruler-mode 0)) + (if (and (boundp 'hl-line-mode) hl-line-mode (not hexl-mode-old-hl-line-mode)) + (hl-line-mode 0)) (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)