[Top][All Lists]

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

[Emacs-diffs] scratch/prop-search 26cd02c 2/2: Allow searching interacti

From: Lars Ingebrigtsen
Subject: [Emacs-diffs] scratch/prop-search 26cd02c 2/2: Allow searching interactively
Date: Mon, 16 Apr 2018 15:35:05 -0400 (EDT)

branch: scratch/prop-search
commit 26cd02c7fb0e025ecb46050fe34b7c4ed3b66098
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Allow searching interactively
 lisp/emacs-lisp/subr-x.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index c5a3e8f..eab016c 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -276,6 +276,11 @@ structure.  The accessor avaliable are
 `prop-match-beginning'/`prop-match-end' (which are the region in
 the buffer that's matching, and `prop-match-value', which is the
 value of PROPERTY at the start of the region."
+  (interactive
+   (list
+    (let ((string (completing-read "Search for property: " obarray)))
+      (when (> (length string) 0)
+        (intern string obarray)))))
   ;; We're standing in the property we're looking for, so find the
   ;; end.
   (if (text-property--match-p value (get-text-property (point) property)

reply via email to

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