/[emacs]/emacs/lisp/progmodes/etags.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/etags.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.171 by monnier, Tue Feb 11 21:40:17 2003 UTC revision 1.172 by lektu, Thu Apr 3 15:55:37 2003 UTC
# Line 29  Line 29 
29  ;;; Code:  ;;; Code:
30    
31  (require 'ring)  (require 'ring)
32    (require 'button)
33    
34  ;;;###autoload  ;;;###autoload
35  (defvar tags-file-name nil  (defvar tags-file-name nil
# Line 1413  where they were found." Line 1414  where they were found."
1414    (goto-char (point-min))    (goto-char (point-min))
1415    (while (re-search-forward string nil t)    (while (re-search-forward string nil t)
1416      (beginning-of-line)      (beginning-of-line)
1417      (let ((tag (buffer-substring (point)      (let* ((tag-info (save-excursion (funcall snarf-tag-function)))
1418                                   (progn (skip-chars-forward "^\177")             (tag (if (eq t (car tag-info)) nil (car tag-info)))
1419                                          (point))))             (file (if tag (file-of-tag)
1420            (props `(action find-tag-other-window mouse-face highlight                     (save-excursion (next-line 1)
1421                            face ,tags-tag-face))                                     (file-of-tag))))
1422            (pt (with-current-buffer standard-output (point))))             (pt (with-current-buffer standard-output (point))))
1423        (princ tag)        (if tag
1424        (when (= (aref tag 0) ?\() (princ " ...)"))            (progn
1425        (add-text-properties pt (with-current-buffer standard-output (point))              (princ (format "[%s]: " file))
1426                             `(item ,tag ,@props) standard-output))              (princ tag)
1427                (when (= (aref tag 0) ?\() (princ " ...)"))
1428                (with-current-buffer standard-output
1429                (make-text-button pt (point)
1430                                  'tag-info tag-info
1431                                  'file file
1432                                  'action (lambda (button)
1433                                            ;; TODO: just `find-file is too simple.
1434                                            ;; Use code `find-tag-in-order'.
1435                                            (let ((tag-info (button-get button 'tag-info)))
1436                                              (find-file (button-get button 'file))
1437                                              (etags-goto-tag-location tag-info)))
1438                                  'face 'tags-tag-face
1439                                  'type 'button)))
1440            (princ (format "- %s" file))
1441            (with-current-buffer standard-output
1442              (make-text-button pt (point)
1443              'file file
1444              'action (lambda (button)
1445                        ;; TODO: just `find-file is too simple.
1446                        ;; Use code `find-tag-in-order'.
1447                        (find-file (button-get button 'file))
1448                        (goto-char (point-min)))
1449              'face 'tags-tag-face
1450              'type 'button))
1451            ))
1452      (terpri)      (terpri)
1453      (forward-line 1))      (forward-line 1))
1454    (when tags-apropos-verbose (princ "\n")))    (when tags-apropos-verbose (princ "\n")))
# Line 1814  directory specification." Line 1840  directory specification."
1840            (funcall tags-apropos-function regexp))))            (funcall tags-apropos-function regexp))))
1841      (etags-tags-apropos-additional regexp))      (etags-tags-apropos-additional regexp))
1842    (with-current-buffer "*Tags List*"    (with-current-buffer "*Tags List*"
1843      (setq buffer-read-only t)      (apropos-mode)
1844      (apropos-mode)))      ;; apropos-mode is derived from fundamental-mode and it kills
1845        ;; all local variables.
1846        (setq buffer-read-only t)))
1847    
1848  ;; XXX Kludge interface.  ;; XXX Kludge interface.
1849    

Legend:
Removed from v.1.171  
changed lines
  Added in v.1.172

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26