diff options
| author | Masatake YAMATO | 2004-07-28 09:05:23 +0000 |
|---|---|---|
| committer | Masatake YAMATO | 2004-07-28 09:05:23 +0000 |
| commit | 31f98a937c1f1ef2576e5225e8007f1398df00fe (patch) | |
| tree | 5877c4e5c2d81af6ef6c04a01093332ced917c78 | |
| parent | b687047c72d2d13ced9ce55d38193b24ec722773 (diff) | |
| download | emacs-31f98a937c1f1ef2576e5225e8007f1398df00fe.tar.gz emacs-31f98a937c1f1ef2576e5225e8007f1398df00fe.zip | |
(etags-tags-apropos): Show building progress.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/etags.el | 97 |
2 files changed, 55 insertions, 46 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4f1d0859f65..5ec1cbb9ede 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-07-28 Masatake YAMATO <jet@gyve.org> | ||
| 2 | |||
| 3 | * progmodes/etags.el (etags-tags-apropos): Show building progress. | ||
| 4 | |||
| 1 | 2004-07-26 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2004-07-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * imenu.el (imenu-prev-index-position-function) | 7 | * imenu.el (imenu-prev-index-position-function) |
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 () |