emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5161c9c: (looking-back): Make the second arg non-op


From: Stefan Monnier
Subject: [Emacs-diffs] master 5161c9c: (looking-back): Make the second arg non-optional.
Date: Thu, 16 Apr 2015 02:25:21 +0000

branch: master
commit 5161c9ca6a6107da30d411fb2ad72e01d08e5704
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    (looking-back): Make the second arg non-optional.
    
    * lisp/subr.el (substitute-key-definition-key, special-form-p)
    (macrop): Drop deprecated second arg to indirect-function.
    (looking-back): Make the second arg non-optional.
---
 etc/NEWS     |    2 ++
 lisp/subr.el |   15 ++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 0da02dc..5e312ed 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -709,6 +709,8 @@ behavior, set `diff-switches' to `-c'.
 
 ** New hook `pre-redisplay-functions', a bit easier to use than 
pre-redisplay-function.
 
+** The second arg of `looking-back' should always be provided explicitly.
+
 ** Obsolete text properties `intangible', `point-entered', and `point-left'.
 Replaced by properties `cursor-intangible' and `cursor-sensor-functions',
 implemented by the new `cursor-intangible-mode' and
diff --git a/lisp/subr.el b/lisp/subr.el
index 03d12fe..1d41e01 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -931,7 +931,7 @@ in a cleaner way with command remapping, like this:
            (nconc (nreverse skipped) newdef)))
       ;; Look past a symbol that names a keymap.
       (setq inner-def
-           (or (indirect-function defn t) defn))
+           (or (indirect-function defn) defn))
       ;; For nested keymaps, we use `inner-def' rather than `defn' so as to
       ;; avoid autoloading a keymap.  This is mostly done to preserve the
       ;; original non-autoloading behavior of pre-map-keymap times.
@@ -1974,14 +1974,13 @@ process."
 
 ;; compatibility
 
-(make-obsolete
- 'process-kill-without-query
- "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
- "22.1")
 (defun process-kill-without-query (process &optional _flag)
   "Say no query needed if PROCESS is running when Emacs is exited.
 Optional second argument if non-nil says to require a query.
 Value is t if a query was formerly required."
+  (declare (obsolete
+            "use `process-query-on-exit-flag' or 
`set-process-query-on-exit-flag'."
+            "22.1"))
   (let ((old (process-query-on-exit-flag process)))
     (set-process-query-on-exit-flag process nil)
     old))
@@ -2758,12 +2757,12 @@ Otherwise, return nil."
 (defun special-form-p (object)
   "Non-nil if and only if OBJECT is a special form."
   (if (and (symbolp object) (fboundp object))
-      (setq object (indirect-function object t)))
+      (setq object (indirect-function object)))
   (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))
 
 (defun macrop (object)
   "Non-nil if and only if OBJECT is a macro."
-  (let ((def (indirect-function object t)))
+  (let ((def (indirect-function object)))
     (when (consp def)
       (or (eq 'macro (car def))
           (and (autoloadp def) (memq (nth 4 def) '(macro t)))))))
@@ -3506,6 +3505,8 @@ LIMIT.
 
 As a general recommendation, try to avoid using `looking-back'
 wherever possible, since it is slow."
+  (declare
+   (advertised-calling-convention (regexp limit &optional greedy) "25.1"))
   (let ((start (point))
        (pos
         (save-excursion



reply via email to

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