Mercurial > emacs
comparison lisp/emacs-lisp/lisp.el @ 108143:624169215019
* emacs-lisp/lisp.el (lisp-complete-symbol): Fail gracefully.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 27 Apr 2010 13:57:32 -0400 |
parents | e61497621f0d |
children | 973b5bc5fcfe |
comparison
equal
deleted
inserted
replaced
108142:087c3dc49930 | 108143:624169215019 |
---|---|
622 symbols with function definitions, values or properties are | 622 symbols with function definitions, values or properties are |
623 considered." | 623 considered." |
624 (interactive) | 624 (interactive) |
625 (let* ((data (lisp-completion-at-point predicate)) | 625 (let* ((data (lisp-completion-at-point predicate)) |
626 (plist (nthcdr 3 data))) | 626 (plist (nthcdr 3 data))) |
627 (let ((completion-annotate-function (plist-get plist :annotate-function))) | 627 (if (null data) |
628 (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) | 628 (minibuffer-message "Nothing to complete") |
629 (plist-get plist :predicate))))) | 629 (let ((completion-annotate-function |
630 (plist-get plist :annotate-function))) | |
631 (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) | |
632 (plist-get plist :predicate)))))) | |
630 | 633 |
631 | 634 |
632 (defun lisp-completion-at-point (&optional predicate) | 635 (defun lisp-completion-at-point (&optional predicate) |
633 ;; FIXME: the `end' could be after point? | 636 ;; FIXME: the `end' could be after point? |
634 (let* ((pos (point)) | 637 (let* ((pos (point)) |