Rename `chinese-cns11643-6' to `=cns11643-6'.
[chise/xemacs-chise.git.1] / lisp / etags.el
index cba03e0..0c368cb 100644 (file)
@@ -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))))
 
 \f
@@ -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:
 
@@ -771,7 +786,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 +802,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
@@ -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)