aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2015-04-15 22:25:16 -0400
committerStefan Monnier2015-04-15 22:25:16 -0400
commit5161c9ca6a6107da30d411fb2ad72e01d08e5704 (patch)
tree31d921931cdd6184afc708caf3dd2a46083e1dee
parentcaea9a238590f2d165c74a5941c50946677b87ae (diff)
downloademacs-5161c9ca6a6107da30d411fb2ad72e01d08e5704.tar.gz
emacs-5161c9ca6a6107da30d411fb2ad72e01d08e5704.zip
(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.
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/subr.el15
2 files changed, 10 insertions, 7 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 0da02dcd148..5e312ed3033 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -709,6 +709,8 @@ behavior, set `diff-switches' to `-c'.
709 709
710** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function. 710** New hook `pre-redisplay-functions', a bit easier to use than pre-redisplay-function.
711 711
712** The second arg of `looking-back' should always be provided explicitly.
713
712** Obsolete text properties `intangible', `point-entered', and `point-left'. 714** Obsolete text properties `intangible', `point-entered', and `point-left'.
713Replaced by properties `cursor-intangible' and `cursor-sensor-functions', 715Replaced by properties `cursor-intangible' and `cursor-sensor-functions',
714implemented by the new `cursor-intangible-mode' and 716implemented by the new `cursor-intangible-mode' and
diff --git a/lisp/subr.el b/lisp/subr.el
index 03d12fec2a9..1d41e015fa7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -931,7 +931,7 @@ in a cleaner way with command remapping, like this:
931 (nconc (nreverse skipped) newdef))) 931 (nconc (nreverse skipped) newdef)))
932 ;; Look past a symbol that names a keymap. 932 ;; Look past a symbol that names a keymap.
933 (setq inner-def 933 (setq inner-def
934 (or (indirect-function defn t) defn)) 934 (or (indirect-function defn) defn))
935 ;; For nested keymaps, we use `inner-def' rather than `defn' so as to 935 ;; For nested keymaps, we use `inner-def' rather than `defn' so as to
936 ;; avoid autoloading a keymap. This is mostly done to preserve the 936 ;; avoid autoloading a keymap. This is mostly done to preserve the
937 ;; original non-autoloading behavior of pre-map-keymap times. 937 ;; original non-autoloading behavior of pre-map-keymap times.
@@ -1974,14 +1974,13 @@ process."
1974 1974
1975;; compatibility 1975;; compatibility
1976 1976
1977(make-obsolete
1978 'process-kill-without-query
1979 "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
1980 "22.1")
1981(defun process-kill-without-query (process &optional _flag) 1977(defun process-kill-without-query (process &optional _flag)
1982 "Say no query needed if PROCESS is running when Emacs is exited. 1978 "Say no query needed if PROCESS is running when Emacs is exited.
1983Optional second argument if non-nil says to require a query. 1979Optional second argument if non-nil says to require a query.
1984Value is t if a query was formerly required." 1980Value is t if a query was formerly required."
1981 (declare (obsolete
1982 "use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'."
1983 "22.1"))
1985 (let ((old (process-query-on-exit-flag process))) 1984 (let ((old (process-query-on-exit-flag process)))
1986 (set-process-query-on-exit-flag process nil) 1985 (set-process-query-on-exit-flag process nil)
1987 old)) 1986 old))
@@ -2758,12 +2757,12 @@ Otherwise, return nil."
2758(defun special-form-p (object) 2757(defun special-form-p (object)
2759 "Non-nil if and only if OBJECT is a special form." 2758 "Non-nil if and only if OBJECT is a special form."
2760 (if (and (symbolp object) (fboundp object)) 2759 (if (and (symbolp object) (fboundp object))
2761 (setq object (indirect-function object t))) 2760 (setq object (indirect-function object)))
2762 (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled))) 2761 (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))
2763 2762
2764(defun macrop (object) 2763(defun macrop (object)
2765 "Non-nil if and only if OBJECT is a macro." 2764 "Non-nil if and only if OBJECT is a macro."
2766 (let ((def (indirect-function object t))) 2765 (let ((def (indirect-function object)))
2767 (when (consp def) 2766 (when (consp def)
2768 (or (eq 'macro (car def)) 2767 (or (eq 'macro (car def))
2769 (and (autoloadp def) (memq (nth 4 def) '(macro t))))))) 2768 (and (autoloadp def) (memq (nth 4 def) '(macro t)))))))
@@ -3506,6 +3505,8 @@ LIMIT.
3506 3505
3507As a general recommendation, try to avoid using `looking-back' 3506As a general recommendation, try to avoid using `looking-back'
3508wherever possible, since it is slow." 3507wherever possible, since it is slow."
3508 (declare
3509 (advertised-calling-convention (regexp limit &optional greedy) "25.1"))
3509 (let ((start (point)) 3510 (let ((start (point))
3510 (pos 3511 (pos
3511 (save-excursion 3512 (save-excursion