comparison lisp/hexl.el @ 74332:47735bfd0d95

(hexl-mode-old-hl-line-range-function): New variable (hexl-mode-old-hl-line-face): New variable (hexl-mode, hexl-mode-exit): Fix the highlighting of the current line when exit from the hexl-mode.
author Masatake YAMATO <jet@gyve.org>
date Thu, 30 Nov 2006 15:55:14 +0000
parents f61bc15684bb
children b77f0a410819
comparison
equal deleted inserted replaced
74331:55705fba7ce0 74332:47735bfd0d95
102 102
103 (defvar ruler-mode) 103 (defvar ruler-mode)
104 (defvar ruler-mode-ruler-function) 104 (defvar ruler-mode-ruler-function)
105 (defvar hl-line-mode) 105 (defvar hl-line-mode)
106 106
107 (defvar hexl-mode-old-hl-line-range-function)
108 (defvar hexl-mode-old-hl-line-face)
107 (defvar hexl-mode-old-hl-line-mode) 109 (defvar hexl-mode-old-hl-line-mode)
108 (defvar hexl-mode-old-local-map) 110 (defvar hexl-mode-old-local-map)
109 (defvar hexl-mode-old-mode-name) 111 (defvar hexl-mode-old-mode-name)
110 (defvar hexl-mode-old-major-mode) 112 (defvar hexl-mode-old-major-mode)
111 (defvar hexl-mode-old-ruler-mode) 113 (defvar hexl-mode-old-ruler-mode)
257 259
258 (make-local-variable 'hexl-mode-old-hl-line-mode) 260 (make-local-variable 'hexl-mode-old-hl-line-mode)
259 (setq hexl-mode-old-hl-line-mode 261 (setq hexl-mode-old-hl-line-mode
260 (and (boundp 'hl-line-mode) hl-line-mode)) 262 (and (boundp 'hl-line-mode) hl-line-mode))
261 263
264 (set (make-local-variable 'hexl-mode-old-hl-line-range-function)
265 hl-line-range-function)
266 (set (make-local-variable 'hexl-mode-old-hl-line-face)
267 hl-line-face)
268
262 (make-local-variable 'hexl-mode-old-syntax-table) 269 (make-local-variable 'hexl-mode-old-syntax-table)
263 (setq hexl-mode-old-syntax-table (syntax-table)) 270 (setq hexl-mode-old-syntax-table (syntax-table))
264 (set-syntax-table (standard-syntax-table)) 271 (set-syntax-table (standard-syntax-table))
265 272
266 (add-hook 'write-contents-functions 'hexl-save-buffer nil t) 273 (add-hook 'write-contents-functions 'hexl-save-buffer nil t)
386 393
387 (if (and (boundp 'ruler-mode) ruler-mode (not hexl-mode-old-ruler-mode)) 394 (if (and (boundp 'ruler-mode) ruler-mode (not hexl-mode-old-ruler-mode))
388 (ruler-mode 0)) 395 (ruler-mode 0))
389 (if (and (boundp 'hl-line-mode) hl-line-mode (not hexl-mode-old-hl-line-mode)) 396 (if (and (boundp 'hl-line-mode) hl-line-mode (not hexl-mode-old-hl-line-mode))
390 (hl-line-mode 0)) 397 (hl-line-mode 0))
398
399 (set 'hl-line-range-function hexl-mode-old-hl-line-range-function)
400 (set 'hl-line-face hexl-mode-old-hl-line-face)
401
391 (setq require-final-newline hexl-mode-old-require-final-newline) 402 (setq require-final-newline hexl-mode-old-require-final-newline)
392 (setq mode-name hexl-mode-old-mode-name) 403 (setq mode-name hexl-mode-old-mode-name)
393 (setq isearch-search-fun-function hexl-mode-old-isearch-search-fun-function) 404 (setq isearch-search-fun-function hexl-mode-old-isearch-search-fun-function)
394 (use-local-map hexl-mode-old-local-map) 405 (use-local-map hexl-mode-old-local-map)
395 (set-syntax-table hexl-mode-old-syntax-table) 406 (set-syntax-table hexl-mode-old-syntax-table)