Commit e2d4ea5a authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(mail-abbrev-complete-alias): Use completion-in-region.

parent 5f24557b
2009-11-25 Stefan Monnier <>
* mail/mailabbrev.el (mail-abbrev-complete-alias):
Use completion-in-region.
* dabbrev.el (dabbrev--minibuffer-origin): Use minibuffer-selected-window.
(dabbrev-completion): Use completion-in-region.
(dabbrev--abbrev-at-point): Simplify regexp.
......@@ -569,27 +569,12 @@ of a mail alias. The value is set up, buffer-local, when first needed.")
;; Based on lisp.el:lisp-complete-symbol
(let* ((end (point))
(beg (with-syntax-table mail-abbrev-syntax-table
(backward-word 1)
(alias (buffer-substring beg end))
(completion (try-completion alias mail-abbrevs)))
(cond ((eq completion t)
(message "%s" alias)) ; confirm
((null completion)
(error "[Can't complete \"%s\"]" alias)) ; (message ...) (ding)
((not (string= completion alias))
(delete-region beg end)
(insert completion))
(t (with-output-to-temp-buffer "*Completions*"
(message "Making completion list...")
(all-completions alias mail-abbrevs)
(message "Making completion list...done"))
(let ((end (point))
(beg (with-syntax-table mail-abbrev-syntax-table
(backward-word 1)
(completion-in-region beg end mail-abbrevs)))
(defun mail-abbrev-next-line (&optional arg)
"Expand a mail abbrev before point, then move vertically down ARG lines.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment