X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fetags.el;h=0c368cb9329f1c0d34fb5006f1f372644324d198;hb=1cd5f022da4cc8d7168ee078ed498bb71d95351a;hp=f68527b7b9b71da4acda824f460cafaa68af8496;hpb=3890a2e3064a7f562107c58e59d928284ec04741;p=chise%2Fxemacs-chise.git diff --git a/lisp/etags.el b/lisp/etags.el index f68527b..0c368cb 100644 --- a/lisp/etags.el +++ b/lisp/etags.el @@ -190,9 +190,12 @@ the current buffer." (when (file-readable-p parent-tag-file) (push parent-tag-file result))) ;; tag-table-alist - (let ((key (or buffer-file-name - (concat default-directory (buffer-name)))) - expression) + (let* ((key (or buffer-file-name + (concat default-directory (buffer-name)))) + (key (if (eq system-type 'windows-nt) + (replace-in-string key "\\\\" "/") + key)) + expression) (dolist (item tag-table-alist) (setq expression (car item)) ;; If the car of the alist item is a string, apply it as a regexp @@ -405,7 +408,7 @@ File name returned is relative to tag table file's directory." (defun buffer-tag-table-files () "Returns a list of all files referenced by all TAGS tables that this buffer uses." - (apply #'nconc + (apply #'append (mapcar #'tag-table-files (buffer-tag-table-list)))) @@ -502,6 +505,7 @@ this buffer uses." ((string-match "\\.scm\\'" filename) 'scheme-mode) (t nil))) + (defvar c-mode-syntax-table) (set-syntax-table (cond ((and (eq file-type 'c-mode) c-mode-syntax-table) c-mode-syntax-table) @@ -735,6 +739,16 @@ If it returns non-nil, this file needs processing by evalling (cons buf startpos)))) ;;;###autoload +(defun find-tag-at-point (tagname &optional other-window) + "*Find tag whose name contains TAGNAME. +Identical to `find-tag' but does not prompt for tag when called interactively; +instead, uses tag around or before point." + (interactive (if current-prefix-arg + '(nil nil) + (list (find-tag-default) nil))) + (find-tag tagname other-window)) + +;;;###autoload (defun find-tag (tagname &optional other-window) "*Find tag whose name contains TAGNAME. Selects the buffer that the tag is contained in @@ -747,7 +761,8 @@ in the tag table that matches the tagname used in the previous find-tag. the tag. This version of this function supports multiple active tags tables, -and completion. +and completion. See also the commands `\\[push-tag-mark]' and +`\\[pop-tag-mark]'. Variables of note: @@ -1156,7 +1171,7 @@ If this is a C-defined elisp function, it does something more clever." (defcustom tag-mark-stack-max 16 "*The maximum number of elements kept on the mark-stack used by tags-search. See also the commands `\\[push-tag-mark]' and -and `\\[pop-tag-mark]'." +`\\[pop-tag-mark]'." :type 'integer :group 'etags)