Function: change-log-search-tag-name-1

change-log-search-tag-name-1 is a byte-compiled function defined in add-log.el.gz.

Signature

(change-log-search-tag-name-1 &optional FROM)

Documentation

Search for a tag name within subexpression 1 of last match.

Optional argument FROM specifies a buffer position where the tag name should be located. Return value is a cons whose car is the string representing the tag and whose cdr is the position where the tag was found.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/add-log.el.gz
(defun change-log-search-tag-name-1 (&optional from)
  "Search for a tag name within subexpression 1 of last match.
Optional argument FROM specifies a buffer position where the tag
name should be located.  Return value is a cons whose car is the
string representing the tag and whose cdr is the position where
the tag was found."
  (save-restriction
    (narrow-to-region (match-beginning 1) (match-end 1))
    (when from (goto-char from))
    ;; The regexp below skips any symbol near `point' (FROM) followed by
    ;; whitespace and another symbol.  This should skip, for example,
    ;; "struct" in a specification like "(struct buffer)" and move to
    ;; "buffer".  A leading paren is ignored.
    (when (looking-at
	   "[(]?\\(?:\\(?:\\sw\\|\\s_\\)+\\(?:[ \t]+\\(\\sw\\|\\s_\\)+\\)\\)")
      (goto-char (match-beginning 1)))
    (cons (find-tag-default) (point))))