emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116573: Small doc related to new completion functio


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116573: Small doc related to new completion functions
Date: Thu, 27 Feb 2014 08:01:36 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116573
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2014-02-27 00:01:22 -0800
message:
  Small doc related to new completion functions
  
  * doc/lispref/minibuf.texi (Programmed Completion):
  Mention completion-table-with-cache.
  
  * lisp/minibuffer.el (completion-table-dynamic)
  (completion-table-with-cache): Doc fixes.
  
  * etc/NEWS: Related markup.  Unrelated copyedit.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/minibuf.texi       
minibuf.texi-20091113204419-o5vbwnq5f7feedwu-6199
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/minibuffer.el             
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-02-25 08:41:47 +0000
+++ b/doc/lispref/ChangeLog     2014-02-27 08:01:22 +0000
@@ -1,3 +1,8 @@
+2014-02-27  Glenn Morris  <address@hidden>
+
+       * minibuf.texi (Programmed Completion):
+       Mention completion-table-with-cache.
+
 2014-02-25  Glenn Morris  <address@hidden>
 
        * display.texi (Window Systems):

=== modified file 'doc/lispref/minibuf.texi'
--- a/doc/lispref/minibuf.texi  2014-02-17 18:04:17 +0000
+++ b/doc/lispref/minibuf.texi  2014-02-27 08:01:22 +0000
@@ -1814,6 +1814,13 @@
 and the interface for programmed completion functions.
 @end defun
 
address@hidden completion-table-with-cache function &optional ignore-case
+This is a wrapper for @code{completion-table-dynamic} that saves the
+last argument-result pair.  This means that multiple lookups with the
+same argument only need to call @var{function} once.  This can be useful
+when a slow operation is involved, such as calling an external process.
address@hidden defun
+
 @node Completion in Buffers
 @subsection Completion in Ordinary Buffers
 @cindex inline completion

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2014-02-27 07:42:57 +0000
+++ b/etc/NEWS  2014-02-27 08:01:22 +0000
@@ -1183,15 +1183,17 @@
 strings (including for partial or substring completion), or call
 `completion-hilit-commonality' to add the highlight.
 
++++
 *** New function `completion-table-with-cache' is a wrapper for
 `completion-table-dynamic' that caches the result of the last lookup.
 
++++
 *** New function `completion-table-merge' to combine several
 completion tables by merging their completions.
 
 ** New minor modes `prettify-symbols-mode' and `global-prettify-symbols-mode'
-let you enable symbol prettification (replacing a string like "lambda" with
-the Greek lambda character).
+display specified symbols as composed characters.  E.g., in Emacs Lisp mode,
+this replaces the string "lambda" with the Greek lambda character.
 
 ** Terminal changes
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-27 07:42:57 +0000
+++ b/lisp/ChangeLog    2014-02-27 08:01:22 +0000
@@ -1,5 +1,8 @@
 2014-02-27  Glenn Morris  <address@hidden>
 
+       * minibuffer.el (completion-table-dynamic)
+       (completion-table-with-cache): Doc fixes.
+
        * emacs-lisp/crm.el (crm-default-separator, crm-separator)
        (completing-read-multiple): Doc fixes.
 

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2014-02-26 21:31:22 +0000
+++ b/lisp/minibuffer.el        2014-02-27 08:01:22 +0000
@@ -179,7 +179,9 @@
 
 The result of the `completion-table-dynamic' form is a function
 that can be used as the COLLECTION argument to `try-completion' and
-`all-completions'.  See Info node `(elisp)Programmed Completion'."
+`all-completions'.  See Info node `(elisp)Programmed Completion'.
+
+See also the related function `completion-table-with-cache'."
   (lambda (string pred action)
     (if (or (eq (car-safe action) 'boundaries) (eq action 'metadata))
         ;; `fun' is not supposed to return another function but a plain old
@@ -191,13 +193,15 @@
         (complete-with-action action (funcall fun string) string pred)))))
 
 (defun completion-table-with-cache (fun &optional ignore-case)
-  "Create dynamic completion table from FUN, with cache.
-This wraps `completion-table-dynamic', but saves the last
+  "Create dynamic completion table from function FUN, with cache.
+This is a wrapper for `completion-table-dynamic' that saves the last
 argument-result pair from FUN, so that several lookups with the
 same argument (or with an argument that starts with the first one)
-only need to call FUN once.  Most useful when FUN performs a relatively
-slow operation, such as calling an external process (see Bug#11906).
+only need to call FUN once.  This can be useful when FUN performs a
+relatively slow operation, such as calling an external process.
+
 When IGNORE-CASE is non-nil, FUN is expected to be case-insensitive."
+  ;; See eg bug#11906.
   (let* (last-arg last-result
          (new-fun
           (lambda (arg)


reply via email to

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