aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-04-26 12:58:13 +0000
committerJuanma Barranquero2008-04-26 12:58:13 +0000
commit26c548b0a40d1573d518909c41379c7eed0c86c3 (patch)
treeba56a3e35d54899eded116cd1aa8afcb62c9e4fa
parent556885cd6e116addf172ae31763a653919904dea (diff)
downloademacs-26c548b0a40d1573d518909c41379c7eed0c86c3.tar.gz
emacs-26c548b0a40d1573d518909c41379c7eed0c86c3.zip
(completion-pcm-word-delimiters): Add :group.
(completion-pcm--all-completions): Doc fix. (completion-styles-alist, completion-all-completions): Fix typos in docstrings.
-rw-r--r--lisp/minibuffer.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 1e9def104a3..cbe0269eaaf 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -258,7 +258,7 @@ the second failed attempt to complete."
258 completion-pcm-try-completion completion-pcm-all-completions)) 258 completion-pcm-try-completion completion-pcm-all-completions))
259 "List of available completion styles. 259 "List of available completion styles.
260Each element has the form (NAME TRY-COMPLETION ALL-COMPLETIONS) 260Each element has the form (NAME TRY-COMPLETION ALL-COMPLETIONS)
261where NAME is the name that should be used in `completion-styles' 261where NAME is the name that should be used in `completion-styles',
262TRY-COMPLETION is the function that does the completion, and 262TRY-COMPLETION is the function that does the completion, and
263ALL-COMPLETIONS is the function that lists the completions.") 263ALL-COMPLETIONS is the function that lists the completions.")
264 264
@@ -295,7 +295,7 @@ a new position for point."
295 "List the possible completions of STRING in completion table TABLE. 295 "List the possible completions of STRING in completion table TABLE.
296Only the elements of table that satisfy predicate PRED are considered. 296Only the elements of table that satisfy predicate PRED are considered.
297POINT is the position of point within STRING. 297POINT is the position of point within STRING.
298The return value is a list of completions and may contain the BASE-SIZE 298The return value is a list of completions and may contain the base-size
299in the last `cdr'." 299in the last `cdr'."
300 ;; The property `completion-styles' indicates that this functional 300 ;; The property `completion-styles' indicates that this functional
301 ;; completion-table claims to take care of completion styles itself. 301 ;; completion-table claims to take care of completion styles itself.
@@ -1072,6 +1072,7 @@ expression (not containing character ranges like `a-z')."
1072 ;; Refresh other vars. 1072 ;; Refresh other vars.
1073 (completion-pcm--prepare-delim-re value)) 1073 (completion-pcm--prepare-delim-re value))
1074 :initialize 'custom-initialize-reset 1074 :initialize 'custom-initialize-reset
1075 :group 'minibuffer
1075 :type 'string) 1076 :type 'string)
1076 1077
1077(defun completion-pcm--pattern-trivial-p (pattern) 1078(defun completion-pcm--pattern-trivial-p (pattern)
@@ -1090,7 +1091,7 @@ or a symbol chosen among `any', `star', `point'."
1090 (let ((pattern nil) 1091 (let ((pattern nil)
1091 (p 0) 1092 (p 0)
1092 (p0 0)) 1093 (p0 0))
1093 1094
1094 (while (setq p (string-match completion-pcm--delim-wild-regex basestr p)) 1095 (while (setq p (string-match completion-pcm--delim-wild-regex basestr p))
1095 (push (substring basestr p0 p) pattern) 1096 (push (substring basestr p0 p) pattern)
1096 (if (eq (aref basestr p) ?*) 1097 (if (eq (aref basestr p) ?*)
@@ -1117,13 +1118,13 @@ or a symbol chosen among `any', `star', `point'."
1117 1118
1118(defun completion-pcm--all-completions (pattern table pred) 1119(defun completion-pcm--all-completions (pattern table pred)
1119 "Find all completions for PATTERN in TABLE obeying PRED. 1120 "Find all completions for PATTERN in TABLE obeying PRED.
1120PATTERN is as returned by `complete-string->pattern'." 1121PATTERN is as returned by `completion-pcm--string->pattern'."
1121 ;; Find an initial list of possible completions. 1122 ;; Find an initial list of possible completions.
1122 (if (completion-pcm--pattern-trivial-p pattern) 1123 (if (completion-pcm--pattern-trivial-p pattern)
1123 1124
1124 ;; Minibuffer contains no delimiters -- simple case! 1125 ;; Minibuffer contains no delimiters -- simple case!
1125 (all-completions (car pattern) table pred) 1126 (all-completions (car pattern) table pred)
1126 1127
1127 ;; Use all-completions to do an initial cull. This is a big win, 1128 ;; Use all-completions to do an initial cull. This is a big win,
1128 ;; since all-completions is written in C! 1129 ;; since all-completions is written in C!
1129 (let* (;; Convert search pattern to a standard regular expression. 1130 (let* (;; Convert search pattern to a standard regular expression.
@@ -1218,8 +1219,6 @@ PATTERN is as returned by `complete-string->pattern'."
1218 ;; Do it afterwards because it changes `pointpat' by sideeffect. 1219 ;; Do it afterwards because it changes `pointpat' by sideeffect.
1219 (merged (completion-pcm--pattern->string (nreverse mergedpat)))) 1220 (merged (completion-pcm--pattern->string (nreverse mergedpat))))
1220 (cons merged (- (length merged) newpos)))))) 1221 (cons merged (- (length merged) newpos))))))
1221
1222
1223 1222
1224 1223
1225(provide 'minibuffer) 1224(provide 'minibuffer)