comparison lisp/hi-lock.el @ 105372:bd2966850aac

Use `called-interactively-p' instead of `interactive-p'.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 02 Oct 2009 03:48:36 +0000
parents b78ceb253d15
children 8f110099da5c
comparison
equal deleted inserted replaced
105371:0769a73f1d18 105372:bd2966850aac
336 " Hi" "")) 336 " Hi" ""))
337 :global nil 337 :global nil
338 :keymap hi-lock-map 338 :keymap hi-lock-map
339 (when (and (equal (buffer-name) "*scratch*") 339 (when (and (equal (buffer-name) "*scratch*")
340 load-in-progress 340 load-in-progress
341 (not (interactive-p)) 341 (not (called-interactively-p 'interactive))
342 (not hi-lock-archaic-interface-message-used)) 342 (not hi-lock-archaic-interface-message-used))
343 (setq hi-lock-archaic-interface-message-used t) 343 (setq hi-lock-archaic-interface-message-used t)
344 (if hi-lock-archaic-interface-deduce 344 (if hi-lock-archaic-interface-deduce
345 (global-hi-lock-mode hi-lock-mode) 345 (global-hi-lock-mode hi-lock-mode)
346 (warn 346 (warn
634 (funcall hi-lock-file-patterns-policy all-patterns)) 634 (funcall hi-lock-file-patterns-policy all-patterns))
635 ((eq hi-lock-file-patterns-policy 'ask) 635 ((eq hi-lock-file-patterns-policy 'ask)
636 (y-or-n-p "Add patterns from this buffer to hi-lock? ")) 636 (y-or-n-p "Add patterns from this buffer to hi-lock? "))
637 (t nil))) 637 (t nil)))
638 (hi-lock-set-file-patterns all-patterns) 638 (hi-lock-set-file-patterns all-patterns)
639 (if (interactive-p) 639 (if (called-interactively-p 'interactive)
640 (message "Hi-lock added %d patterns." (length all-patterns))))))) 640 (message "Hi-lock added %d patterns." (length all-patterns)))))))
641 641
642 (defun hi-lock-font-lock-hook () 642 (defun hi-lock-font-lock-hook ()
643 "Add hi-lock patterns to font-lock's." 643 "Add hi-lock patterns to font-lock's."
644 (unless hi-lock--inhibit-font-lock-hook 644 (unless hi-lock--inhibit-font-lock-hook