Commit f8fd4f55 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 9f6fcdc5
......@@ -6026,7 +6026,8 @@ Currently it is tuned to C and Perl syntax."
(let (found-bad (p (point)))
(setq last-nonmenu-event 13) ; To disable popup
(with-no-warnings ; It is useful to push the mark here.
(map-y-or-n-p "Insert space here? "
(lambda (arg) (insert " "))
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment