emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102595: * lisp/bindings.el (complete


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102595: * lisp/bindings.el (complete-symbol): Move back from minibuffer.el.
Date: Mon, 06 Dec 2010 16:06:02 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102595
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-12-06 16:06:02 -0500
message:
  * lisp/bindings.el (complete-symbol): Move back from minibuffer.el.
  * lisp/minibuffer.el (completion-at-point): Remove the `arg'.
modified:
  etc/NEWS
  lisp/bindings.el
  lisp/minibuffer.el
=== modified file 'etc/NEWS'
--- a/etc/NEWS  2010-12-03 02:54:34 +0000
+++ b/etc/NEWS  2010-12-06 21:06:02 +0000
@@ -228,7 +228,7 @@
 +++
 ** There is a new command `count-words-region', which does what you expect.
 
-** completion-at-point is now an alias for complete-symbol.
+** completion-at-point now handles tags and semantic completion.
 
 ** The default value of `backup-by-copying-when-mismatch' is now t.
 

=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el  2010-10-19 19:20:33 +0000
+++ b/lisp/bindings.el  2010-12-06 21:06:02 +0000
@@ -655,6 +655,16 @@
 
 (define-key esc-map "\t" 'complete-symbol)
 
+(defun complete-symbol (arg)
+  "Perform completion on the text around point.
+The completion method is determined by `completion-at-point-functions'.
+
+With a prefix argument, this command does completion within
+the collection of symbols listed in the index of the manual for the
+language you are using."
+  (interactive "P")
+  (if arg (info-complete-symbol) (completion-at-point)))
+
 ;; Reduce total amount of space we must allocate during this function
 ;; that we will not need to keep permanently.
 (garbage-collect)

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2010-11-18 02:44:44 +0000
+++ b/lisp/minibuffer.el        2010-12-06 21:06:02 +0000
@@ -1251,31 +1251,23 @@
  `:predicate'           a predicate that completion candidates need to satisfy.
  `:annotation-function' the value to use for `completion-annotate-function'.")
 
-(defun completion-at-point (&optional arg)
+(defun completion-at-point ()
   "Perform completion on the text around point.
-The completion method is determined by `completion-at-point-functions'.
-
-With a prefix argument, this command does completion within
-the collection of symbols listed in the index of the manual for the
-language you are using."
-  (interactive "P")
-  (if arg
-      (info-complete-symbol)
-    (let ((res (run-hook-with-args-until-success
-               'completion-at-point-functions)))
-      (cond
-       ((functionp res) (funcall res))
-       (res
-       (let* ((plist (nthcdr 3 res))
-              (start (nth 0 res))
-              (end (nth 1 res))
-              (completion-annotate-function
-               (or (plist-get plist :annotation-function)
-                   completion-annotate-function)))
-         (completion-in-region start end (nth 2 res)
-                               (plist-get plist :predicate))))))))
-
-(define-obsolete-function-alias 'complete-symbol 'completion-at-point "24.1")
+The completion method is determined by `completion-at-point-functions'."
+  (interactive)
+  (let ((res (run-hook-with-args-until-success
+              'completion-at-point-functions)))
+    (cond
+     ((functionp res) (funcall res))
+     (res
+      (let* ((plist (nthcdr 3 res))
+             (start (nth 0 res))
+             (end (nth 1 res))
+             (completion-annotate-function
+              (or (plist-get plist :annotation-function)
+                  completion-annotate-function)))
+        (completion-in-region start end (nth 2 res)
+                              (plist-get plist :predicate)))))))
 
 ;;; Key bindings.
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]