]> code.delx.au - gnu-emacs/blobdiff - lisp/hi-lock.el
Put CUA move property on move-end-of-line
[gnu-emacs] / lisp / hi-lock.el
index 8d40852cf6889d8291143f30dca4f4c7ca1ad21b..81c7296760f7ff0cb148a64ed0ee10cd64ed99f6 100644 (file)
@@ -23,7 +23,7 @@
 ;; Boston, MA 02111-1307, USA.
 
 ;;; Commentary:
-;; 
+;;
 ;;  With the hi-lock commands text matching interactively entered
 ;;  regexp's can be highlighted.  For example, `M-x highlight-regexp
 ;;  RET clearly RET RET' will highlight all occurrences of `clearly'
@@ -58,7 +58,7 @@
 ;;    to the edit menu.
 ;;
 ;;    (hi-lock-mode 1)
-;;  
+;;
 ;;    You might also want to bind the hi-lock commands to more
 ;;    finger-friendly sequences:
 
@@ -83,7 +83,6 @@
 (eval-and-compile
   (require 'font-lock))
 
-;;;###autoload
 (defgroup hi-lock-interactive-text-highlighting nil
   "Interactively add and remove font-lock patterns for highlighting text."
   :group 'faces)
@@ -260,7 +259,7 @@ which can be called interactively, are:
   Highlight matches of phrase PHRASE in current buffer with FACE.
   (PHRASE can be any REGEXP, but spaces will be replaced by matches
   to whitespace and initial lower-case letters will become case insensitive.)
+
 \\[highlight-lines-matching-regexp] REGEXP FACE
   Highlight lines containing matches of REGEXP in current buffer with FACE.
 
@@ -295,6 +294,10 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'."
     (when (and (not hi-lock-mode-prev) hi-lock-mode)
       (add-hook 'find-file-hooks 'hi-lock-find-file-hook)
       (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)
+      (when (eq nil font-lock-defaults)
+       (setq font-lock-defaults '(nil)))
+      (unless font-lock-mode
+       (font-lock-mode 1))
       (define-key-after menu-bar-edit-menu [hi-lock]
         (cons "Regexp Highlighting" hi-lock-menu))
       (dolist (buffer (buffer-list))
@@ -565,4 +568,5 @@ Optional argument END is maximum excursion."
 
 (provide 'hi-lock)
 
+;;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066
 ;;; hi-lock.el ends here