aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-12-06 16:06:02 -0500
committerStefan Monnier2010-12-06 16:06:02 -0500
commit67027b49796eec01dccf1e14d7b0497b2d484328 (patch)
treeb38a77d75e4caa35f7045690da750857a4eb4b6b
parent88b5a757a2ea698831c61bb10abc9c0abab7d31c (diff)
downloademacs-67027b49796eec01dccf1e14d7b0497b2d484328.tar.gz
emacs-67027b49796eec01dccf1e14d7b0497b2d484328.zip
* lisp/bindings.el (complete-symbol): Move back from minibuffer.el.
* lisp/minibuffer.el (completion-at-point): Remove the `arg'.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/bindings.el10
-rw-r--r--lisp/minibuffer.el40
3 files changed, 27 insertions, 25 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c492809ca0e..5972481358c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -228,7 +228,7 @@ replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'.
228+++ 228+++
229** There is a new command `count-words-region', which does what you expect. 229** There is a new command `count-words-region', which does what you expect.
230 230
231** completion-at-point is now an alias for complete-symbol. 231** completion-at-point now handles tags and semantic completion.
232 232
233** The default value of `backup-by-copying-when-mismatch' is now t. 233** The default value of `backup-by-copying-when-mismatch' is now t.
234 234
diff --git a/lisp/bindings.el b/lisp/bindings.el
index e9a4c559169..bd4a1203364 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -655,6 +655,16 @@ is okay. See `mode-line-format'.")
655 655
656(define-key esc-map "\t" 'complete-symbol) 656(define-key esc-map "\t" 'complete-symbol)
657 657
658(defun complete-symbol (arg)
659 "Perform completion on the text around point.
660The completion method is determined by `completion-at-point-functions'.
661
662With a prefix argument, this command does completion within
663the collection of symbols listed in the index of the manual for the
664language you are using."
665 (interactive "P")
666 (if arg (info-complete-symbol) (completion-at-point)))
667
658;; Reduce total amount of space we must allocate during this function 668;; Reduce total amount of space we must allocate during this function
659;; that we will not need to keep permanently. 669;; that we will not need to keep permanently.
660(garbage-collect) 670(garbage-collect)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 78580c86e45..8d09d5d3f6d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1251,31 +1251,23 @@ Currently supported properties are:
1251 `:predicate' a predicate that completion candidates need to satisfy. 1251 `:predicate' a predicate that completion candidates need to satisfy.
1252 `:annotation-function' the value to use for `completion-annotate-function'.") 1252 `:annotation-function' the value to use for `completion-annotate-function'.")
1253 1253
1254(defun completion-at-point (&optional arg) 1254(defun completion-at-point ()
1255 "Perform completion on the text around point. 1255 "Perform completion on the text around point.
1256The completion method is determined by `completion-at-point-functions'. 1256The completion method is determined by `completion-at-point-functions'."
1257 1257 (interactive)
1258With a prefix argument, this command does completion within 1258 (let ((res (run-hook-with-args-until-success
1259the collection of symbols listed in the index of the manual for the 1259 'completion-at-point-functions)))
1260language you are using." 1260 (cond
1261 (interactive "P") 1261 ((functionp res) (funcall res))
1262 (if arg 1262 (res
1263 (info-complete-symbol) 1263 (let* ((plist (nthcdr 3 res))
1264 (let ((res (run-hook-with-args-until-success 1264 (start (nth 0 res))
1265 'completion-at-point-functions))) 1265 (end (nth 1 res))
1266 (cond 1266 (completion-annotate-function
1267 ((functionp res) (funcall res)) 1267 (or (plist-get plist :annotation-function)
1268 (res 1268 completion-annotate-function)))
1269 (let* ((plist (nthcdr 3 res)) 1269 (completion-in-region start end (nth 2 res)
1270 (start (nth 0 res)) 1270 (plist-get plist :predicate)))))))
1271 (end (nth 1 res))
1272 (completion-annotate-function
1273 (or (plist-get plist :annotation-function)
1274 completion-annotate-function)))
1275 (completion-in-region start end (nth 2 res)
1276 (plist-get plist :predicate))))))))
1277
1278(define-obsolete-function-alias 'complete-symbol 'completion-at-point "24.1")
1279 1271
1280;;; Key bindings. 1272;;; Key bindings.
1281 1273