]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/lisp.el
authors.el trivia
[gnu-emacs] / lisp / emacs-lisp / lisp.el
index deb06f5254953ffbd71c4de2796370a3d606e681..8c53ad5861257ee955dbd95d445f1f53f0ea0833 100644 (file)
@@ -1,6 +1,6 @@
 ;;; lisp.el --- Lisp editing commands for Emacs
 
-;; Copyright (C) 1985-1986, 1994, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1994, 2000-2012 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: lisp, languages
@@ -145,12 +145,12 @@ This command assumes point is not in a string or comment."
     (while (/= arg 0)
       (if (null forward-sexp-function)
           (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))
-          (condition-case err
-              (while (progn (setq pos (point))
-                       (forward-sexp inc)
-                       (/= (point) pos)))
-            (scan-error (goto-char (nth 2 err))))
-        (if (= (point) pos)
+       (condition-case err
+           (while (progn (setq pos (point))
+                         (forward-sexp inc)
+                         (/= (point) pos)))
+         (scan-error (goto-char (nth (if (> arg 0) 3 2) err))))
+       (if (= (point) pos)
             (signal 'scan-error
                     (list "Unbalanced parentheses" (point) (point)))))
       (setq arg (- arg inc)))))
@@ -636,9 +636,8 @@ considered."
          (plist (nthcdr 3 data)))
     (if (null data)
         (minibuffer-message "Nothing to complete")
-      (let ((completion-annotate-function
-             (plist-get plist :annotate-function)))
-      (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
+      (let ((completion-extra-properties plist))
+        (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
                               (plist-get plist :predicate))))))
 
 
@@ -685,7 +684,7 @@ considered."
       (when end
        (list beg end obarray
              :predicate predicate
-             :annotate-function
+             :annotation-function
              (unless (eq predicate 'fboundp)
                (lambda (str) (if (fboundp (intern-soft str)) " <f>"))))))))