comparison lisp/progmodes/etags.el @ 56556:8699eccc1a33

(etags-tags-apropos): Show building progress.
author Masatake YAMATO <jet@gyve.org>
date Wed, 28 Jul 2004 09:05:23 +0000
parents 7c48b959658d
children 12cc6bc5d550 0bdb5a16ae51
comparison
equal deleted inserted replaced
56555:e7ddaefbeaa4 56556:8699eccc1a33
1451 (when tags-apropos-verbose 1451 (when tags-apropos-verbose
1452 (princ "Tags in file `") 1452 (princ "Tags in file `")
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 1458 (message "Making tags apropos buffer for `%s'...%d%%"
1459 (let* (;; Get the local value in the tags table 1459 string
1460 ;; buffer before switching buffers. 1460 (/ (point) point-max))
1461 (goto-func goto-tag-location-function) 1461 (beginning-of-line)
1462 (tag-info (save-excursion (funcall snarf-tag-function))) 1462
1463 (tag (if (eq t (car tag-info)) nil (car tag-info))) 1463 (let* ( ;; Get the local value in the tags table
1464 (file-path (save-excursion (if tag (file-of-tag) 1464 ;; buffer before switching buffers.
1465 (save-excursion (next-line 1) 1465 (goto-func goto-tag-location-function)
1466 (file-of-tag))))) 1466 (tag-info (save-excursion (funcall snarf-tag-function)))
1467 (file-label (if tag (file-of-tag t) 1467 (tag (if (eq t (car tag-info)) nil (car tag-info)))
1468 (save-excursion (next-line 1) 1468 (file-path (save-excursion (if tag (file-of-tag)
1469 (file-of-tag t)))) 1469 (save-excursion (next-line 1)
1470 (pt (with-current-buffer standard-output (point)))) 1470 (file-of-tag)))))
1471 (if tag 1471 (file-label (if tag (file-of-tag t)
1472 (progn 1472 (save-excursion (next-line 1)
1473 (princ (format "[%s]: " file-label)) 1473 (file-of-tag t))))
1474 (princ tag) 1474 (pt (with-current-buffer standard-output (point))))
1475 (when (= (aref tag 0) ?\() (princ " ...)")) 1475 (if tag
1476 (with-current-buffer standard-output 1476 (progn
1477 (make-text-button pt (point) 1477 (princ (format "[%s]: " file-label))
1478 'tag-info tag-info 1478 (princ tag)
1479 'file-path file-path 1479 (when (= (aref tag 0) ?\() (princ " ...)"))
1480 'goto-func goto-func 1480 (with-current-buffer standard-output
1481 'action (lambda (button) 1481 (make-text-button pt (point)
1482 (let ((tag-info (button-get button 'tag-info)) 1482 'tag-info tag-info
1483 (goto-func (button-get button 'goto-func))) 1483 'file-path file-path
1484 (tag-find-file-of-tag (button-get button 'file-path)) 1484 'goto-func goto-func
1485 (widen) 1485 'action (lambda (button)
1486 (funcall goto-func tag-info))) 1486 (let ((tag-info (button-get button 'tag-info))
1487 'face 'tags-tag-face 1487 (goto-func (button-get button 'goto-func)))
1488 'type 'button))) 1488 (tag-find-file-of-tag (button-get button 'file-path))
1489 (princ (format "- %s" file-label)) 1489 (widen)
1490 (with-current-buffer standard-output 1490 (funcall goto-func tag-info)))
1491 (make-text-button pt (point) 1491 'face 'tags-tag-face
1492 'file-path file-path 1492 'type 'button)))
1493 'action (lambda (button) 1493 (princ (format "- %s" file-label))
1494 (tag-find-file-of-tag (button-get button 'file-path)) 1494 (with-current-buffer standard-output
1495 ;; Get the local value in the tags table 1495 (make-text-button pt (point)
1496 ;; buffer before switching buffers. 1496 'file-path file-path
1497 (goto-char (point-min))) 1497 'action (lambda (button)
1498 'face 'tags-tag-face 1498 (tag-find-file-of-tag (button-get button 'file-path))
1499 'type 'button)) 1499 ;; Get the local value in the tags table
1500 )) 1500 ;; buffer before switching buffers.
1501 (terpri) 1501 (goto-char (point-min)))
1502 (forward-line 1)) 1502 'face 'tags-tag-face
1503 'type 'button))
1504 ))
1505 (terpri)
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 ()
1506 (let ((files nil) 1511 (let ((files nil)
1507 beg) 1512 beg)