From: Richard M. Stallman Date: Mon, 27 Dec 2004 15:39:42 +0000 (+0000) Subject: (cperl-find-bad-style): Use with-no-warnings. X-Git-Tag: ttn-vms-21-2-B4~3146 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/f8fd4f555e7a3305e7dda483b155ffe8a72694eb (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. --- diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index accdad515f..00bd1af4da 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." (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 @@ Delay of auto-help controlled by `cperl-lazy-help-time'." ;;; 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)