mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
(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.
This commit is contained in:
parent
9f6fcdc516
commit
f8fd4f555e
1 changed files with 5 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue