** dabbrev
+---
+*** New function 'dabbrev-capf' for use on 'completion-at-point-functions'
+
+++
*** New user option 'dabbrev-ignored-buffer-modes'.
Buffers with major modes in this list will be ignored. By default,
then it searches *all* buffers."
(interactive "*P")
(dabbrev--reset-global-variables)
+ (setq dabbrev--check-other-buffers (and arg t))
+ (setq dabbrev--check-all-buffers
+ (and arg (= (prefix-numeric-value arg) 16)))
+ (let ((completion-at-point-functions '(dabbrev-capf)))
+ (completion-at-point)))
+
+(defun dabbrev-capf ()
+ "Dabbrev completion function for `completion-at-point-functions'."
(let* ((abbrev (dabbrev--abbrev-at-point))
(beg (progn (search-backward abbrev) (point)))
(end (progn (search-forward abbrev) (point)))
(t
(mapcar #'downcase completion-list)))))))
(complete-with-action a list s p)))))
- (setq dabbrev--check-other-buffers (and arg t))
- (setq dabbrev--check-all-buffers
- (and arg (= (prefix-numeric-value arg) 16)))
- (completion-in-region beg end table)))
+ (list beg end table)))
;;;###autoload
(defun dabbrev-expand (arg)