[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37538: [PATCH] Add docstring for `tags-complete-tags-table-file'.
From: |
Hong Xu |
Subject: |
bug#37538: [PATCH] Add docstring for `tags-complete-tags-table-file'. |
Date: |
Sat, 28 Sep 2019 11:40:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 9/28/19 1:11 AM, Eli Zaretskii wrote:
From: Hong Xu <hong@topbug.net>
Date: Sat, 28 Sep 2019 00:59:21 -0700
* lisp/progmodes/etags.el (tags-complete-tags-table-file): Add docstring.
Thanks. A comment below.
-(defun tags-complete-tags-table-file (string predicate what) ; Doc string?
+(defun tags-complete-tags-table-file (string predicate what)
+ "Complete file names in the current tags table.
+The meaning of the arguments are the same as the function form of
+COLLECTION as explained in Info node `(elisp) Programmed
+Completion'."
The first line of the doc string should mention the arguments. And we
should explain STRING and WHAT there, because those aren't passed to
all-completions and try-completion.
Please see my update below. I'm writing in this concise form because `(elisp)
Programmed Completion' has a lot of explanation and I don't think we should
repeat them here.
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index a03516100087..2770baa7067c 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1843,13 +1843,18 @@ tags-query-replace
delimited)
(fileloop-continue))
-(defun tags-complete-tags-table-file (string predicate what) ; Doc string?
+(defun tags-complete-tags-table-file (string predicate what)
+ "Complete STRING from file names in the current tags table.
+The meaning of the arguments are the same as the function form of
+COLLECTION as explained in Info node `(elisp) Programmed
+Completion', except that if WHAT does not equal t, it is treated
+as if it were nil."
(save-excursion
;; If we need to ask for the tag table, allow that.
(let ((enable-recursive-minibuffers t))
(visit-tags-table-buffer))
(if (eq what t)
- (all-completions string (tags-table-files) predicate)
+ (all-completions string (tags-table-files) predicate)
(try-completion string (tags-table-files) predicate))))
;;;###autoload
--
2.20.1