;;; hi-lock.el --- minor mode for interactive automatic highlighting
;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: David M. Koppelman, koppel@ece.lsu.edu
;; Keywords: faces, minor-mode, matching, display
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
Write active REGEXPs into buffer as comments (if possible). They may
be read the next time file is loaded or when the \\[hi-lock-find-patterns] command
is issued. The inserted regexps are in the form of font lock keywords.
- (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns],
- any valid `font-lock-keywords' form is acceptable. When a file is
- loaded the patterns are read if `hi-lock-file-patterns-policy is
+ (See `font-lock-keywords'.) They may be edited and re-loaded with \\[hi-lock-find-patterns],
+ any valid `font-lock-keywords' form is acceptable. When a file is
+ loaded the patterns are read if `hi-lock-file-patterns-policy' is
'ask and the user responds y to the prompt, or if
`hi-lock-file-patterns-policy' is bound to a function and that
function returns t.
\\<minibuffer-local-must-match-map>Use \\[minibuffer-complete] to complete a partially typed regexp.
\(See info node `Minibuffer History'.\)"
(interactive
- (if (and (display-popup-menus-p) (vectorp (this-command-keys)))
+ (if (and (display-popup-menus-p) (not last-nonmenu-event))
(catch 'snafu
(or
(x-popup-menu
(if (null hi-lock-interactive-patterns)
(error "There are no interactive patterns"))
(let ((beg (point)))
- (mapcar
+ (mapc
(lambda (pattern)
(insert (format "%s: (%s)\n"
hi-lock-file-patterns-prefix
hi-lock-string-serialize-hash)
hi-lock-string-serialize-serial)))
+(defun hi-lock-unload-function ()
+ "Unload the Hi-Lock library."
+ (global-hi-lock-mode -1)
+ ;; continue standard unloading
+ nil)
+
(provide 'hi-lock)
;; arch-tag: d2e8fd07-4cc9-4c6f-a200-1e729bc54066