diff options
| author | Stefan Monnier | 2015-04-15 22:25:16 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-04-15 22:25:16 -0400 |
| commit | 5161c9ca6a6107da30d411fb2ad72e01d08e5704 (patch) | |
| tree | 31d921931cdd6184afc708caf3dd2a46083e1dee | |
| parent | caea9a238590f2d165c74a5941c50946677b87ae (diff) | |
| download | emacs-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/NEWS | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 15 |
2 files changed, 10 insertions, 7 deletions
| @@ -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'. |
| 713 | Replaced by properties `cursor-intangible' and `cursor-sensor-functions', | 715 | Replaced by properties `cursor-intangible' and `cursor-sensor-functions', |
| 714 | implemented by the new `cursor-intangible-mode' and | 716 | implemented 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. |
| 1983 | Optional second argument if non-nil says to require a query. | 1979 | Optional second argument if non-nil says to require a query. |
| 1984 | Value is t if a query was formerly required." | 1980 | Value 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 | ||
| 3507 | As a general recommendation, try to avoid using `looking-back' | 3506 | As a general recommendation, try to avoid using `looking-back' |
| 3508 | wherever possible, since it is slow." | 3507 | wherever 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 |