X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fetags.el;h=56fc4782d1835cff3eabec376f580b2ce033a530;hb=7a33575176f7e0b9ca40c60815621792b45f31c9;hp=cba03e029515525f20473b1267001bd5b12d0c5a;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git diff --git a/lisp/etags.el b/lisp/etags.el index cba03e0..56fc478 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 @@ -771,7 +785,7 @@ Variables of note: '(find-tag find-tag-other-window tags-loop-continue)))) (push-tag-mark)) (if other-window - (pop-to-buffer tag-buf) + (pop-to-buffer tag-buf t) (switch-to-buffer tag-buf)) (widen) (push-mark) @@ -787,7 +801,7 @@ Variables of note: ;;;###autoload (defun find-tag-other-window (tagname &optional next) - "*Find tag whose name contains TAGNAME. + "*Find tag whose name contains TAGNAME, in another window. Selects the buffer that the tag is contained in in another window and puts point at its definition. If TAGNAME is a null string, the expression in the buffer