aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorKaroly Lorentey2004-07-30 16:33:42 +0000
committerKaroly Lorentey2004-07-30 16:33:42 +0000
commitaa1e2e2282f2c0222676f3d984812e1b6ccee299 (patch)
tree661d451b483236cc29eb5eee5cb64b66c884c0a8 /lisp/progmodes
parente1775c3e8209d76d22151282bc5343ed948b948c (diff)
parentee945d083910ee9d0af23008806ba3cf2edcd5b4 (diff)
downloademacs-aa1e2e2282f2c0222676f3d984812e1b6ccee299.tar.gz
emacs-aa1e2e2282f2c0222676f3d984812e1b6ccee299.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-471 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-472 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-223
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/etags.el97
1 files changed, 51 insertions, 46 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 184077f6a3a..4464df3a916 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1453,53 +1453,58 @@ where they were found."
1453 (tags-with-face 'highlight (princ buffer-file-name)) 1453 (tags-with-face 'highlight (princ buffer-file-name))
1454 (princ "':\n\n")) 1454 (princ "':\n\n"))
1455 (goto-char (point-min)) 1455 (goto-char (point-min))
1456 (while (re-search-forward string nil t) 1456 (let ((point-max (/ (float (point-max)) 100.0)))
1457 (beginning-of-line) 1457 (while (re-search-forward string nil t)
1458 (message "Making tags apropos buffer for `%s'...%d%%"
1459 string
1460 (/ (point) point-max))
1461 (beginning-of-line)
1458 1462
1459 (let* (;; Get the local value in the tags table 1463 (let* ( ;; Get the local value in the tags table
1460 ;; buffer before switching buffers. 1464 ;; buffer before switching buffers.
1461 (goto-func goto-tag-location-function) 1465 (goto-func goto-tag-location-function)
1462 (tag-info (save-excursion (funcall snarf-tag-function))) 1466 (tag-info (save-excursion (funcall snarf-tag-function)))
1463 (tag (if (eq t (car tag-info)) nil (car tag-info))) 1467 (tag (if (eq t (car tag-info)) nil (car tag-info)))
1464 (file-path (save-excursion (if tag (file-of-tag) 1468 (file-path (save-excursion (if tag (file-of-tag)
1465 (save-excursion (next-line 1) 1469 (save-excursion (next-line 1)
1466 (file-of-tag))))) 1470 (file-of-tag)))))
1467 (file-label (if tag (file-of-tag t) 1471 (file-label (if tag (file-of-tag t)
1468 (save-excursion (next-line 1) 1472 (save-excursion (next-line 1)
1469 (file-of-tag t)))) 1473 (file-of-tag t))))
1470 (pt (with-current-buffer standard-output (point)))) 1474 (pt (with-current-buffer standard-output (point))))
1471 (if tag 1475 (if tag
1472 (progn 1476 (progn
1473 (princ (format "[%s]: " file-label)) 1477 (princ (format "[%s]: " file-label))
1474 (princ tag) 1478 (princ tag)
1475 (when (= (aref tag 0) ?\() (princ " ...)")) 1479 (when (= (aref tag 0) ?\() (princ " ...)"))
1476 (with-current-buffer standard-output 1480 (with-current-buffer standard-output
1477 (make-text-button pt (point) 1481 (make-text-button pt (point)
1478 'tag-info tag-info 1482 'tag-info tag-info
1479 'file-path file-path 1483 'file-path file-path
1480 'goto-func goto-func 1484 'goto-func goto-func
1481 'action (lambda (button) 1485 'action (lambda (button)
1482 (let ((tag-info (button-get button 'tag-info)) 1486 (let ((tag-info (button-get button 'tag-info))
1483 (goto-func (button-get button 'goto-func))) 1487 (goto-func (button-get button 'goto-func)))
1484 (tag-find-file-of-tag (button-get button 'file-path)) 1488 (tag-find-file-of-tag (button-get button 'file-path))
1485 (widen) 1489 (widen)
1486 (funcall goto-func tag-info))) 1490 (funcall goto-func tag-info)))
1487 'face 'tags-tag-face 1491 'face 'tags-tag-face
1488 'type 'button))) 1492 'type 'button)))
1489 (princ (format "- %s" file-label)) 1493 (princ (format "- %s" file-label))
1490 (with-current-buffer standard-output 1494 (with-current-buffer standard-output
1491 (make-text-button pt (point) 1495 (make-text-button pt (point)
1492 'file-path file-path 1496 'file-path file-path
1493 'action (lambda (button) 1497 'action (lambda (button)
1494 (tag-find-file-of-tag (button-get button 'file-path)) 1498 (tag-find-file-of-tag (button-get button 'file-path))
1495 ;; Get the local value in the tags table 1499 ;; Get the local value in the tags table
1496 ;; buffer before switching buffers. 1500 ;; buffer before switching buffers.
1497 (goto-char (point-min))) 1501 (goto-char (point-min)))
1498 'face 'tags-tag-face 1502 'face 'tags-tag-face
1499 'type 'button)) 1503 'type 'button))
1500 )) 1504 ))
1501 (terpri) 1505 (terpri)
1502 (forward-line 1)) 1506 (forward-line 1))
1507 (message nil))
1503 (when tags-apropos-verbose (princ "\n"))) 1508 (when tags-apropos-verbose (princ "\n")))
1504 1509
1505(defun etags-tags-table-files () 1510(defun etags-tags-table-files ()