diff options
Diffstat (limited to 'cape.el')
| -rw-r--r-- | cape.el | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -824,20 +824,20 @@ completion table is refreshed on every input change." (pcase (funcall capf) (`(,beg ,end ,table . ,plist) `(,beg ,end - ,(let* ((beg (copy-marker beg)) - (end (copy-marker end t)) - (input (buffer-substring-no-properties beg end))) - (lambda (str pred action) - (let ((new-input (buffer-substring-no-properties beg end))) - (unless (or (string-match-p "\\s-" new-input) ;; Support Orderless - (funcall valid input new-input)) - (pcase (funcall capf) - (`(,_beg ,_end ,new-table . ,_plist) - ;; NOTE: We have to make sure that the completion table is interruptible. - ;; An interruption should not happen between the setqs. - (setq table new-table input new-input))))) - (complete-with-action action table str pred))) - ,@plist)))) + ,(let* ((beg (copy-marker beg)) + (end (copy-marker end t)) + (input (buffer-substring-no-properties beg end))) + (lambda (str pred action) + (let ((new-input (buffer-substring-no-properties beg end))) + (unless (or (string-match-p "\\s-" new-input) ;; Support Orderless + (funcall valid input new-input)) + (pcase (funcall capf) + (`(,_beg ,_end ,new-table . ,_plist) + ;; NOTE: We have to make sure that the completion table is interruptible. + ;; An interruption should not happen between the setqs. + (setq table new-table input new-input))))) + (complete-with-action action table str pred))) + ,@plist)))) ;;;###autoload (defun cape-wrap-properties (capf &rest properties) |
