]> git.eshelyaron.com Git - emacs.git/commitdiff
(etags-tags-apropos): Show building progress.
authorMasatake YAMATO <jet@gyve.org>
Wed, 28 Jul 2004 09:05:23 +0000 (09:05 +0000)
committerMasatake YAMATO <jet@gyve.org>
Wed, 28 Jul 2004 09:05:23 +0000 (09:05 +0000)
lisp/ChangeLog
lisp/progmodes/etags.el

index 4f1d0859f653dc4c86fd85a4eeea655f51d92c56..5ec1cbb9eded26b74856e71d68f17ca9e5857979 100644 (file)
@@ -1,3 +1,7 @@
+2004-07-28  Masatake YAMATO  <jet@gyve.org>
+
+       * progmodes/etags.el (etags-tags-apropos): Show building progress.
+
 2004-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * imenu.el (imenu-prev-index-position-function)
index 184077f6a3a4f3e50361754810b4643a51d5ebac..4464df3a916cefeb399ead85924ee66300e37eb5 100644 (file)
@@ -1453,53 +1453,58 @@ where they were found."
     (tags-with-face 'highlight (princ buffer-file-name))
     (princ "':\n\n"))
   (goto-char (point-min))
-  (while (re-search-forward string nil t)
-    (beginning-of-line)
+  (let ((point-max (/ (float (point-max)) 100.0)))
+    (while (re-search-forward string nil t)
+      (message "Making tags apropos buffer for `%s'...%d%%"
+              string
+              (/ (point) point-max))
+      (beginning-of-line)
 
-    (let* (;; Get the local value in the tags table
-          ;; buffer before switching buffers.
-          (goto-func goto-tag-location-function)
-          (tag-info (save-excursion (funcall snarf-tag-function)))
-          (tag (if (eq t (car tag-info)) nil (car tag-info)))
-          (file-path (save-excursion (if tag (file-of-tag)
-                                       (save-excursion (next-line 1)
-                                                       (file-of-tag)))))
-          (file-label (if tag (file-of-tag t)
-                        (save-excursion (next-line 1)
-                                        (file-of-tag t))))
-          (pt (with-current-buffer standard-output (point))))
-      (if tag
-         (progn
-           (princ (format "[%s]: " file-label))
-           (princ tag)
-           (when (= (aref tag 0) ?\() (princ " ...)"))
-           (with-current-buffer standard-output
-             (make-text-button pt (point)
-                               'tag-info tag-info
-                               'file-path file-path
-                               'goto-func goto-func
-                               'action (lambda (button)
-                                         (let ((tag-info (button-get button 'tag-info))
-                                               (goto-func (button-get button 'goto-func)))
-                                           (tag-find-file-of-tag (button-get button 'file-path))
-                                           (widen)
-                                           (funcall goto-func tag-info)))
-                               'face 'tags-tag-face
-                               'type 'button)))
-       (princ (format "- %s" file-label))
-       (with-current-buffer standard-output
-         (make-text-button pt (point)
-                           'file-path file-path
-                           'action (lambda (button)
-                                     (tag-find-file-of-tag (button-get button 'file-path))
-                                     ;; Get the local value in the tags table
-                                     ;; buffer before switching buffers.
-                                     (goto-char (point-min)))
-                           'face 'tags-tag-face
-                           'type 'button))
-       ))
-    (terpri)
-    (forward-line 1))
+      (let* ( ;; Get the local value in the tags table
+            ;; buffer before switching buffers.
+            (goto-func goto-tag-location-function)
+            (tag-info (save-excursion (funcall snarf-tag-function)))
+            (tag (if (eq t (car tag-info)) nil (car tag-info)))
+            (file-path (save-excursion (if tag (file-of-tag)
+                                         (save-excursion (next-line 1)
+                                                         (file-of-tag)))))
+            (file-label (if tag (file-of-tag t)
+                          (save-excursion (next-line 1)
+                                          (file-of-tag t))))
+            (pt (with-current-buffer standard-output (point))))
+       (if tag
+           (progn
+             (princ (format "[%s]: " file-label))
+             (princ tag)
+             (when (= (aref tag 0) ?\() (princ " ...)"))
+             (with-current-buffer standard-output
+               (make-text-button pt (point)
+                                 'tag-info tag-info
+                                 'file-path file-path
+                                 'goto-func goto-func
+                                 'action (lambda (button)
+                                           (let ((tag-info (button-get button 'tag-info))
+                                                 (goto-func (button-get button 'goto-func)))
+                                             (tag-find-file-of-tag (button-get button 'file-path))
+                                             (widen)
+                                             (funcall goto-func tag-info)))
+                                 'face 'tags-tag-face
+                                 'type 'button)))
+         (princ (format "- %s" file-label))
+         (with-current-buffer standard-output
+           (make-text-button pt (point)
+                             'file-path file-path
+                             'action (lambda (button)
+                                       (tag-find-file-of-tag (button-get button 'file-path))
+                                       ;; Get the local value in the tags table
+                                       ;; buffer before switching buffers.
+                                       (goto-char (point-min)))
+                             'face 'tags-tag-face
+                             'type 'button))
+         ))
+      (terpri)
+      (forward-line 1))
+    (message nil))
   (when tags-apropos-verbose (princ "\n")))
 
 (defun etags-tags-table-files ()