Commit 5161c9ca authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(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.
parent caea9a23
......@@ -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
......@@ -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
"use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
(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'."
(let ((old (process-query-on-exit-flag process)))
(set-process-query-on-exit-flag process nil)
......@@ -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."
(advertised-calling-convention (regexp limit &optional greedy) "25.1"))
(let ((start (point))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment