changeset 59103:9c9d41548660

(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.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Dec 2004 15:39:42 +0000
parents 0096c58ce34a
children 33d3fb6cbd6e
files lisp/progmodes/cperl-mode.el
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cperl-mode.el	Mon Dec 27 15:24:12 2004 +0000
+++ b/lisp/progmodes/cperl-mode.el	Mon Dec 27 15:39:42 2004 +0000
@@ -6026,7 +6026,8 @@
   (interactive)
   (let (found-bad (p (point)))
     (setq last-nonmenu-event 13)	; To disable popup
-    (beginning-of-buffer)
+    (with-no-warnings  ; It is useful to push the mark here.
+     (beginning-of-buffer))
     (map-y-or-n-p "Insert space here? "
 		  (lambda (arg) (insert " "))
 		  'cperl-next-bad-style
@@ -7183,13 +7184,9 @@
 ;;; Plug for wrong font-lock:
 
 (defun cperl-font-lock-unfontify-region-function (beg end)
-  (let* ((modified (buffer-modified-p)) (buffer-undo-list t)
-	 (inhibit-read-only t) (inhibit-point-motion-hooks t)
-	 before-change-functions after-change-functions
-	 deactivate-mark buffer-file-name buffer-file-truename)
-    (remove-text-properties beg end '(face nil))
-    (when (and (not modified) (buffer-modified-p))
-      (set-buffer-modified-p nil))))
+  ;; Simplified now that font-lock-unfontify-region uses save-buffer-state.
+  (let (before-change-functions after-change-functions)
+    (remove-text-properties beg end '(face nil))))
 
 (defvar cperl-d-l nil)
 (defun cperl-fontify-syntaxically (end)