1 |
;;; hilit19.el --- customizable highlighting for Emacs 19 |
;;; hilit19.el --- customizable highlighting for Emacs 19 |
2 |
|
|
3 |
;; Copyright (c) 1993, 1994, 2001 Free Software Foundation, Inc. |
;; Copyright (c) 1993, 1994, 2001, 2004 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Jonathan Stigelman <stig@hackvan.com> |
;; Author: Jonathan Stigelman <stig@hackvan.com> |
6 |
;; Maintainer: FSF |
;; Maintainer: FSF |
397 |
If hilit19 is dumped into emacs at your site, you may have to set this in |
If hilit19 is dumped into emacs at your site, you may have to set this in |
398 |
your init file.") |
your init file.") |
399 |
|
|
|
(eval-when-compile (setq byte-optimize t)) |
|
|
|
|
400 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
401 |
;; Use this to report bugs: |
;; Use this to report bugs: |
402 |
|
|
943 |
;; Initialization. |
;; Initialization. |
944 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
945 |
|
|
946 |
(and (not hilit-inhibit-rebinding) |
(define-minor-mode hilit-mode |
947 |
(progn |
"Obsolete minor mode. Use `global-font-lock-mode' instead." |
948 |
(substitute-key-definition 'yank 'hilit-yank |
:global t |
949 |
(current-global-map)) |
|
950 |
(substitute-key-definition 'yank-pop 'hilit-yank-pop |
(unless (and hilit-inhibit-rebinding hilit-mode) |
951 |
(current-global-map)) |
(substitute-key-definition |
952 |
(substitute-key-definition 'recenter 'hilit-recenter |
(if hilit-mode 'yank 'hilit-yank) |
953 |
(current-global-map)))) |
(if hilit-mode 'hilit-yank 'yank) |
954 |
|
(current-global-map)) |
955 |
(global-set-key [?\C-\S-l] 'hilit-repaint-command) |
(substitute-key-definition |
956 |
|
(if hilit-mode 'yank-pop 'hilit-yank-pop) |
957 |
(add-hook 'find-file-hook 'hilit-find-file-hook t) |
(if hilit-mode 'hilit-yank-pop 'yank-pop) |
958 |
|
(current-global-map)) |
959 |
|
(substitute-key-definition |
960 |
|
(if hilit-mode 'recenter 'hilit-recenter) |
961 |
|
(if hilit-mode 'hilit-recenter 'recenter) |
962 |
|
(current-global-map))) |
963 |
|
|
964 |
|
(if hilit-mode |
965 |
|
(global-set-key [?\C-\S-l] 'hilit-repaint-command) |
966 |
|
(global-unset-key [?\C-\S-l])) |
967 |
|
|
968 |
|
(if hilit-mode |
969 |
|
(add-hook 'find-file-hook 'hilit-find-file-hook t) |
970 |
|
(remove-hook 'find-file-hook 'hilit-find-file-hook t)) |
971 |
|
|
972 |
|
(unless (and hilit-inhibit-hooks hilit-mode) |
973 |
|
(condition-case c |
974 |
|
(progn |
975 |
|
|
976 |
|
;; BUFFER highlights... |
977 |
|
(mapcar (lambda (hook) |
978 |
|
(if hilit-mode |
979 |
|
(add-hook hook 'hilit-rehighlight-buffer-quietly) |
980 |
|
(remove-hook hook 'hilit-rehighlight-buffer-quietly))) |
981 |
|
'( |
982 |
|
Info-selection-hook |
983 |
|
|
984 |
|
;; runs too early vm-summary-mode-hooks |
985 |
|
vm-summary-pointer-hook |
986 |
|
vm-preview-message-hook |
987 |
|
vm-show-message-hook |
988 |
|
|
989 |
|
rmail-show-message-hook |
990 |
|
mail-setup-hook |
991 |
|
mh-show-mode-hook |
992 |
|
|
993 |
|
dired-after-readin-hook |
994 |
|
)) |
995 |
|
) |
996 |
|
(error (message "Error loading highlight hooks: %s" c) |
997 |
|
(ding) (sit-for 1))))) |
998 |
|
|
999 |
(eval-when-compile (require 'gnus)) ; no compilation gripes |
(eval-when-compile (require 'gnus)) ; no compilation gripes |
1000 |
|
|
|
(and (not hilit-inhibit-hooks) |
|
|
(condition-case c |
|
|
(progn |
|
|
|
|
|
;; BUFFER highlights... |
|
|
(mapcar (function |
|
|
(lambda (hook) |
|
|
(add-hook hook 'hilit-rehighlight-buffer-quietly))) |
|
|
'( |
|
|
Info-selection-hook |
|
|
|
|
|
;; runs too early vm-summary-mode-hooks |
|
|
vm-summary-pointer-hook |
|
|
vm-preview-message-hook |
|
|
vm-show-message-hook |
|
|
|
|
|
rmail-show-message-hook |
|
|
mail-setup-hook |
|
|
mh-show-mode-hook |
|
|
|
|
|
dired-after-readin-hook |
|
|
)) |
|
|
) |
|
|
(error (message "Error loading highlight hooks: %s" c) |
|
|
(ding) (sit-for 1)))) |
|
|
|
|
1001 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1002 |
;; Default patterns for various modes. |
;; Default patterns for various modes. |
1003 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1522 |
|
|
1523 |
(provide 'hilit19) |
(provide 'hilit19) |
1524 |
|
|
1525 |
;;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d |
;; arch-tag: db99739a-4837-41ee-ad02-3baced8ae71d |
1526 |
;;; hilit19.el ends here |
;;; hilit19.el ends here |