]> git.eshelyaron.com Git - emacs.git/commitdiff
semantic-symref-regexp: Allow to input an arbitrary string
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 10 May 2015 00:49:11 +0000 (03:49 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 10 May 2015 17:45:38 +0000 (20:45 +0300)
* lisp/cedet/semantic/symref/list.el (semantic-symref-regexp):
Allow to input an arbitrary string interactively.

lisp/cedet/semantic/symref/list.el

index c99fc5f19327108a44bd61e8e2a389f638f623f0..f72499bf88e5b895730cc1deba130ebb59955885 100644 (file)
@@ -84,9 +84,13 @@ This command uses the currently configured references tool within the
 current project to find references to the input SYM.  The
 references are the organized by file and the name of the function
 they are used in.
-Display the references in`semantic-symref-results-mode'."
-  (interactive (list (semantic-tag-name (semantic-complete-read-tag-buffer-deep
-                                        "Symrefs for: "))))
+Display the references in `semantic-symref-results-mode'."
+  (interactive (list (let ((tag (semantic-current-tag)))
+                       (read-string " Symrefs for: " nil nil
+                                    (when tag
+                                      (regexp-quote (semantic-tag-name tag)))))))
+  ;; FIXME: Shouldn't the input be in Emacs regexp format, for
+  ;; consistency? Converting it to extended is not hard.
   (semantic-fetch-tags)
   (message "Gathering References...")
   ;; Gather results and tags