branch: externals/auctex commit 3536b0645aebbac75f713cf7e2c9d052aaa4183f Author: Mosè Giordano <m...@gnu.org> Commit: Mosè Giordano <m...@gnu.org>
Use default argument of completing-read. * tex.el (TeX-doc): Use default argument of `completing-read'. --- ChangeLog | 4 ++++ tex.el | 13 ++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94040d4..a585737 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-09-24 Mos� Giordano <m...@gnu.org> + + * tex.el (TeX-doc): Use default argument of `completing-read'. + 2015-09-22 Tassilo Horn <t...@gnu.org> * latex.el (LaTeX-find-matching-end): Find correct end when point diff --git a/tex.el b/tex.el index 1c9b95b..e7c54be 100644 --- a/tex.el +++ b/tex.el @@ -6120,13 +6120,12 @@ NAME may be a package, a command, or a document." (dolist (elt docs) (setq completions (nconc (mapcar 'list (car elt)) completions))) ;; Query user. - (setq doc (completing-read - (if contained - (format "Package, command, or document (default %s): " - symbol) - "Package, command, or document: ") - completions)) - (setq name (if (string= doc "") symbol doc)))) + (setq name (completing-read + (if contained + (format "Package, command, or document (default %s): " + symbol) + "Package, command, or document: ") + completions nil nil nil nil symbol)))) (if (not name) (message "No documentation specified") ;; XXX: Provide way to choose in case a symbol can be found in