From e27de09e24254facfdf6c75f30ae21749848a742 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Nov 2005 12:18:37 +0000 Subject: [PATCH] (ffap-menu-rescan): Use inhibit-read-only instead of binding buffer-read-only to nil. --- lisp/ChangeLog | 5 +++++ lisp/ffap.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de11de64de4..304628cef5c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-11-19 Ryan Yeske + + * ffap.el (ffap-menu-rescan): Use inhibit-read-only instead of + binding buffer-read-only to nil. + 2005-11-19 Eli Zaretskii * complete.el (partial-completion-mode): Mention diff --git a/lisp/ffap.el b/lisp/ffap.el index 6eb598d434d..ff35ae0deac 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1519,7 +1519,9 @@ Applies `ffap-menu-text-plist' text properties at all matches." (let ((ffap-next-regexp (or ffap-menu-regexp ffap-next-regexp)) (range (- (point-max) (point-min))) (mod (buffer-modified-p)) ; was buffer modified? - buffer-read-only ; to set text-properties + ;; inhibit-read-only works on read-only text properties + ;; as well as read-only buffers. + (inhibit-read-only t) ; to set text-properties item ;; Avoid repeated searches of the *mode-alist: (major-mode (if (assq major-mode ffap-string-at-point-mode-alist) -- 2.39.5