(or res
(if firsterror (signal (car firsterror) (cdr firsterror))))))
-(defun apply-partially (fun &rest args)
- "Do a \"curried\" partial application of FUN to ARGS.
-ARGS is a list of the first N arguments to pass to FUN.
-The result is a new function that takes the remaining arguments,
-and calls FUN."
- (lexical-let ((fun fun) (args1 args))
- (lambda (&rest args2) (apply fun (append args1 args2)))))
-
(defun complete-with-action (action table string pred)
"Perform completion ACTION.
STRING is the string to complete.
the value of its argument. If completion is performed in the minibuffer,
FUN will be called in the buffer from which the minibuffer was entered.
-The result of the `dynamic-completion-table' form is a function
+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'."
(lexical-let ((fun fun))
(let ((exts '(" " "-"))
(before (substring string 0 point))
(after (substring string point))
- ;; If the user hasn't entered any text yet, then she
- ;; presumably hits SPC to see the *completions*, but
- ;; partial-completion will often find a " " or a "-" to match.
- ;; So disable partial-completion in that situation.
- (completion-styles
- (or (and (equal string "")
- (remove 'partial-completion completion-styles))
- completion-styles))
+ ;; Disable partial-completion for this.
+ (completion-styles
+ (remove 'partial-completion completion-styles))
tem)
(while (and exts (not (consp tem)))
(setq tem (completion-try-completion
At the end, this runs the normal hook `completion-setup-hook'.
It can find the completion buffer in `standard-output'.
-The optional arg COMMON-SUBSTRING, if non-nil, should be a string
+The obsolete optional arg COMMON-SUBSTRING, if non-nil, should be a string
specifying a common substring for adding the faces
`completions-first-difference' and `completions-common-part' to
the completions buffer."
;; since all-completions is written in C!
(let* (;; Convert search pattern to a standard regular expression.
(regex (completion-pcm--pattern->regex pattern))
- (completion-regexp-list (cons regex completion-regexp-list))
+ (case-fold-search completion-ignore-case)
+ (completion-regexp-list (cons regex completion-regexp-list))
(compl (all-completions
(concat prefix (if (stringp (car pattern)) (car pattern) ""))
table pred))
(if (not (functionp table))
;; The internal functions already obeyed completion-regexp-list.
compl
- (let ((case-fold-search completion-ignore-case)
- (poss ()))
+ (let ((poss ()))
(dolist (c compl)
(when (string-match regex c) (push c poss)))
poss)))))
(defun completion-pcm--hilit-commonality (pattern completions)
(when completions
(let* ((re (completion-pcm--pattern->regex pattern '(point)))
+ (case-fold-search completion-ignore-case)
(last (last completions))
(base-size (cdr last)))
;; Remove base-size during mapcar, and add it back later.