aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-27 15:39:42 +0000
committerRichard M. Stallman2004-12-27 15:39:42 +0000
commitf8fd4f555e7a3305e7dda483b155ffe8a72694eb (patch)
tree51979ac9685587f20ac8e6fc8883cf3ebac43184
parent9f6fcdc51615be98d2a026c302868061045176ec (diff)
downloademacs-f8fd4f555e7a3305e7dda483b155ffe8a72694eb.tar.gz
emacs-f8fd4f555e7a3305e7dda483b155ffe8a72694eb.zip
(cperl-find-bad-style): Use with-no-warnings.
(cperl-font-lock-unfontify-region-function): No need to save and restore info, since font-lock.el does it for us.
-rw-r--r--lisp/progmodes/cperl-mode.el13
1 files changed, 5 insertions, 8 deletions
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index accdad515f2..00bd1af4da9 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -6026,7 +6026,8 @@ Currently it is tuned to C and Perl syntax."
6026 (interactive) 6026 (interactive)
6027 (let (found-bad (p (point))) 6027 (let (found-bad (p (point)))
6028 (setq last-nonmenu-event 13) ; To disable popup 6028 (setq last-nonmenu-event 13) ; To disable popup
6029 (beginning-of-buffer) 6029 (with-no-warnings ; It is useful to push the mark here.
6030 (beginning-of-buffer))
6030 (map-y-or-n-p "Insert space here? " 6031 (map-y-or-n-p "Insert space here? "
6031 (lambda (arg) (insert " ")) 6032 (lambda (arg) (insert " "))
6032 'cperl-next-bad-style 6033 'cperl-next-bad-style
@@ -7183,13 +7184,9 @@ Delay of auto-help controlled by `cperl-lazy-help-time'."
7183;;; Plug for wrong font-lock: 7184;;; Plug for wrong font-lock:
7184 7185
7185(defun cperl-font-lock-unfontify-region-function (beg end) 7186(defun cperl-font-lock-unfontify-region-function (beg end)
7186 (let* ((modified (buffer-modified-p)) (buffer-undo-list t) 7187 ;; Simplified now that font-lock-unfontify-region uses save-buffer-state.
7187 (inhibit-read-only t) (inhibit-point-motion-hooks t) 7188 (let (before-change-functions after-change-functions)
7188 before-change-functions after-change-functions 7189 (remove-text-properties beg end '(face nil))))
7189 deactivate-mark buffer-file-name buffer-file-truename)
7190 (remove-text-properties beg end '(face nil))
7191 (when (and (not modified) (buffer-modified-p))
7192 (set-buffer-modified-p nil))))
7193 7190
7194(defvar cperl-d-l nil) 7191(defvar cperl-d-l nil)
7195(defun cperl-fontify-syntaxically (end) 7192(defun cperl-fontify-syntaxically (end)