emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/m-buffer 8c7f63ee16 073/115: Removed pointless call to


From: ELPA Syncer
Subject: [elpa] externals/m-buffer 8c7f63ee16 073/115: Removed pointless call to m-buffer-buffer-for-match.
Date: Tue, 19 Jul 2022 15:58:50 -0400 (EDT)

branch: externals/m-buffer
commit 8c7f63ee1655e7235023ce112865e2e3af7b5348
Author: Phillip Lord <phillip.lord@newcastle.ac.uk>
Commit: Phillip Lord <phillip.lord@newcastle.ac.uk>

    Removed pointless call to m-buffer-buffer-for-match.
    
    This was added because I copied the form of the function from
    overlay-match, when it wasn't actually needed, as overlays need to know
    their buffer, but text-properties don't.
---
 m-buffer.el | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/m-buffer.el b/m-buffer.el
index 9631bb8828..2b5b241446 100644
--- a/m-buffer.el
+++ b/m-buffer.el
@@ -766,22 +766,20 @@ See Info node `(elisp) Overlays' for further information."
 See `add-text-property' for details of the format of properties.
 Text properties are associated with the text and move with it. See
 Info node `(elisp) Text Properties' for further details."
-  (let ((buffer (m-buffer-buffer-for-match match-data)))
-    (m-buffer-on-region
-     (lambda (beginning end)
-       (add-text-properties beginning end properties))
-     match-data)))
+  (m-buffer-on-region
+   (lambda (beginning end)
+     (add-text-properties beginning end properties))
+   match-data))
 
 (defun m-buffer-put-text-property-match (match-data property value)
   "To MATCH-DATA add PROPERTY wth VALUE.
 See `put-text-property' for details of the format of properties.
 Text properties are associated with the text and move with it. See
 Info node `(elisp) Text Properties' for further details."
-  (let ((buffer (m-buffer-buffer-for-match match-data)))
-    (m-buffer-on-region
-     (lambda (beginning end)
-       (put-text-property beginning end property value))
-     match-data)))
+  (m-buffer-on-region
+   (lambda (beginning end)
+     (put-text-property beginning end property value))
+   match-data))
 
 (defun m-buffer-overlay-face-match (match-data face)
   "To MATCH-DATA add FACE to the face property.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]