emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patches for etags and shell-command


From: Francesco Potorti`
Subject: Re: patches for etags and shell-command
Date: Wed, 15 Feb 2006 19:08:01 +0100

John, I tried to follow up on your patch to etags.el, but apparently
your mail server bounces mail coming from *.it!

Anyway, you should get this one via the list.

I was examining the patch you proposed (see below), which is intended to
correctly implement Emacs' behaviour as documented in the manual, in the
Select Tags Table node.  However it has three problems:
- it removes the starting message
- it removes helpful comments
- most importantly, it does not recursively descend into the tree of
  included tags tables

Would you please resubmit a patch that corrects these problems?

>This patch corrects a bug in etags that causes completion to only consider the 
>tags in a single TAGS buffer.  With the match tag completion will consider 
>tags 
>from all the active TAGS buffers.  (The diff is a bit longer than it really 
>needs to be because I inadvertently changed tabs to spaces--I didn't change 
>back 
>to tabs because spaces appear to be the preferred from of indentation based on 
>emacs's default settings.)
>
>--- etags.el    2006-01-20 09:53:43.000000000 -0600
>+++ etags-1.el  2006-01-20 10:14:31.000000000 -0600
>@@ -747,28 +747,21 @@
>  (defun tags-completion-table ()
>    (or tags-completion-table
>        (condition-case ()
>-         (prog2
>-          (message "Making tags completion table for %s..." buffer-file-name)
>-          (let ((included (tags-included-tables))
>-                (table (funcall tags-completion-table-function)))
>-            (save-excursion
>-              ;; Iterate over the list of included tables, and combine each
>-              ;; included table's completion obarray to the parent obarray.
>-              (while included
>-                ;; Visit the buffer.
>-                (let ((tags-file-name (car included)))
>-                  (visit-tags-table-buffer 'same))
>-                ;; Recurse in that buffer to compute its completion table.
>-                (if (tags-completion-table)
>-                    ;; Combine the tables.
>-                    (mapatoms (lambda (sym) (intern (symbol-name sym) table))
>-                              tags-completion-table))
>-                (setq included (cdr included))))
>-            (setq tags-completion-table table))
>-          (message "Making tags completion table for %s...done"
>-                   buffer-file-name))
>-       (quit (message "Tags completion table construction aborted.")
>-             (setq tags-completion-table nil)))))
>+          (let (combined-table)
>+            (save-excursion
>+              (while (visit-tags-table-buffer (and combined-table t))
>+                (let ((included (tags-included-tables))
>+                      (table (funcall tags-completion-table-function)))
>+                  (if (null combined-table)
>+                      (setq combined-table table)
>+                    (mapatoms (lambda (sym)
>+                                (intern (symbol-name sym) combined-table))
>+                              table))
>+                  (message "Making tags completion table for %s...done"
>+                           buffer-file-name))))
>+            (setq tags-completion-table combined-table))
>+        (quit (message "Tags completion table construction aborted.")
>+              (setq tags-completion-table nil)))))
>
>  ;; Completion function for tags.  Does normal try-completion,
>  ;; but builds tags-completion-table on demand.
>
>
>_______________________________________________
>Emacs-devel mailing list
>address@hidden
>http://lists.gnu.org/mailman/listinfo/emacs-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]