]> code.delx.au - gnu-emacs/blobdiff - lisp/cedet/semantic/senator.el
Be more consistent in using register-read-with-preview to read registers
[gnu-emacs] / lisp / cedet / semantic / senator.el
index 366f4a8b7ff56672ab0337333a55f97a2f9201dc..afbed323e5d00a99d97332a57055ab66700e7aee 100644 (file)
@@ -722,8 +722,14 @@ yanked to."
 (defun senator-copy-tag-to-register (register &optional kill-flag)
   "Copy the current tag into REGISTER.
 Optional argument KILL-FLAG will delete the text of the tag to the
-kill ring."
-  (interactive "cTag to register: \nP")
+kill ring.
+
+Interactively, reads the register using `register-read-with-preview',
+if available."
+  (interactive (list (if (fboundp 'register-read-with-preview)
+                        (register-read-with-preview "Tag to register: ")
+                      (read-char "Tag to register: "))
+                    current-prefix-arg))
   (semantic-fetch-tags)
   (let ((ft (semantic-obtain-foreign-tag)))
     (when ft