From 7f3f615b3547ee902461f752ba420ffc705c20d1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 8 Aug 2020 05:32:37 +0200 Subject: [PATCH] Remove many items obsolete since Emacs 23.2 and 23.3 * lisp/allout.el (allout-init): * lisp/emacs-lisp/shadow.el (shadows-compare-text-p): * lisp/ffap.el (ffap-version): * lisp/filecache.el (file-cache-choose-completion): * lisp/help.el (print-help-return-message): * lisp/image-mode.el (image-mode-maybe): * lisp/imenu.el (imenu-example--name-and-position): * lisp/international/mule-cmds.el (princ-list): * lisp/mail/rmail.el (rmail-highlight-face): * lisp/minibuffer.el (read-file-name-predicate): * lisp/mouse.el (mouse-choose-completion): * lisp/progmodes/cc-cmds.el (c-forward-into-nomenclature): * lisp/progmodes/xscheme.el (advertised-xscheme-send-previous-expression): * lisp/simple.el (completion-base-size) (choose-completion-delete-max-match, exchange-dot-and-mark): * lisp/subr.el (eval-next-after-load, interactive-p): * lisp/term.el (term-dynamic-simple-complete): Remove items, obsolete since Emacs 23.2 and 23.3. * doc/misc/cc-mode.texi (Movement Commands): Doc fix. * doc/lispref/help.texi (Accessing Documentation): * lisp/emacs-lisp/edebug.el (edebug-wrap-def-body): * lisp/cedet/data-debug.el: * lisp/simple.el (append-next-kill): * test/manual/cedet/cedet-utests.el (cedet-utest, pulse-test): * test/manual/cedet/semantic-tests.el (semantic-symref-test-count-hits-in-tag) (semantic-lex-spp-write-utest): Use 'called-interactively-p' instead of 'interactive-p'. * lisp/comint.el (comint-dynamic-list-completions): * lisp/progmodes/idlwave.el (idlwave-make-modified-completion-map-xemacs) (idlwave-make-modified-completion-map-emacs): * lisp/progmodes/vhdl-mode.el: * lisp/term.el (term-dynamic-list-completions): Remove references to 'mouse-choose-completion'. * lisp/image-mode.el (image-mode-to-text): Remove reference to 'image-mode-maybe'. * lisp/mail/rmail.el (rmail-highlight-headers): Use 'rmail-highlight' face instead of 'rmail-highlight-face'. * lisp/progmodes/antlr-mode.el (antlr-mode-map, antlr-mode-menu): Remove reference to 'c-forward-into-nomenclature'. * lisp/simple.el (choose-completion, choose-completion-string) (completion-list-mode, completion-setup-function): Don't use 'completion-base-size'. ; * etc/NEWS: List removed items. --- doc/lispref/help.texi | 3 +- doc/misc/cc-mode.texi | 2 -- etc/NEWS | 49 ++++++++++++++++------------- lisp/allout.el | 15 +-------- lisp/cedet/data-debug.el | 2 +- lisp/comint.el | 2 +- lisp/emacs-lisp/edebug.el | 2 +- lisp/emacs-lisp/shadow.el | 3 -- lisp/ffap.el | 2 -- lisp/filecache.el | 3 -- lisp/help.el | 1 - lisp/image-mode.el | 4 +-- lisp/imenu.el | 22 ------------- lisp/international/mule-cmds.el | 6 ---- lisp/mail/rmail.el | 22 ++----------- lisp/minibuffer.el | 5 --- lisp/mouse.el | 3 -- lisp/progmodes/antlr-mode.el | 4 +-- lisp/progmodes/cc-cmds.el | 13 -------- lisp/progmodes/idlwave.el | 11 ++----- lisp/progmodes/vhdl-mode.el | 4 --- lisp/progmodes/xscheme.el | 2 -- lisp/simple.el | 43 +++---------------------- lisp/subr.el | 30 ------------------ lisp/term.el | 49 +---------------------------- test/manual/cedet/cedet-utests.el | 12 +++---- test/manual/cedet/semantic-tests.el | 4 +-- 27 files changed, 55 insertions(+), 263 deletions(-) diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 9b3c4fcb23..d4505d5c3f 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -220,7 +220,8 @@ Accessing Documentation @group ;; @r{Display the data.} - (help-setup-xref (list 'describe-symbols pattern) (interactive-p)) + (help-setup-xref (list 'describe-symbols pattern) + (called-interactively-p 'interactive)) (with-help-window (help-buffer) (mapcar describe-func (sort sym-list 'string<))))) @end group diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 10bbf8ff09..adc233d99d 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -1024,9 +1024,7 @@ Movement Commands preprocessor statements. @item @kbd{M-x c-backward-into-nomenclature} -@itemx @kbd{M-x c-forward-into-nomenclature} @findex c-backward-into-nomenclature -@findex c-forward-into-nomenclature @findex backward-into-nomenclature @r{(c-)} @findex forward-into-nomenclature @r{(c-)} A popular programming style, especially for object-oriented languages diff --git a/etc/NEWS b/etc/NEWS index 91add027e4..ef9a11c521 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -910,35 +910,42 @@ have now been removed. --- ** Some functions and variables obsolete since Emacs 23 have been removed: - -'GOLD-map', 'bookmark-jump-noselect', +'GOLD-map', 'advertised-xscheme-send-previous-expression', +'allout-init', 'bookmark-jump-noselect', 'bookmark-read-annotation-text-func', 'buffer-menu-mode-hook', -'char-coding-system-table', 'char-valid-p', 'charset-bytes', -'charset-id', 'charset-list' (function), 'complete-in-turn', -'completion-common-substring', 'crm-minibuffer-complete', -'crm-minibuffer-complete-and-exit', 'crm-minibuffer-completion-help', -'custom-mode', 'custom-mode-hook', 'detect-coding-with-priority', -'dirtrack-debug' (function), 'dirtrack-debug-toggle', -'dynamic-completion-table', +'c-forward-into-nomenclature', 'char-coding-system-table', +'char-valid-p', 'charset-bytes', 'charset-id', 'charset-list' +(function), 'choose-completion-delete-max-match', 'complete-in-turn', +'completion-base-size', 'completion-common-substring', +'crm-minibuffer-complete', 'crm-minibuffer-complete-and-exit', +'crm-minibuffer-completion-help', 'custom-mode', 'custom-mode-hook', +'detect-coding-with-priority', 'dirtrack-debug' (function), +'dirtrack-debug-toggle', 'dynamic-completion-table', 'easy-menu-precalculate-equivalent-keybindings', 'epa-display-verify-result', 'epg-passphrase-callback-function', -'eshell-report-bug', 'ffap-bug', 'ffap-submit-bug', 'forward-point', -'generic-char-p', 'global-highlight-changes', 'hi-lock-face-history', +'eshell-report-bug', 'eval-next-after-load', 'exchange-dot-and-mark', +'ffap-bug', 'ffap-submit-bug', 'ffap-version', +'file-cache-choose-completion', 'forward-point', 'generic-char-p', +'global-highlight-changes', 'hi-lock-face-history', 'hi-lock-regexp-history', 'highlight-changes-active-string', 'highlight-changes-initial-state', 'highlight-changes-passive-string', -'ispell-aspell-supports-utf8', 'lisp-mode-auto-fill', +'image-mode-maybe', 'imenu-example--name-and-position', +'interactive-p', 'ispell-aspell-supports-utf8', 'lisp-mode-auto-fill', 'locate-file-completion', 'make-coding-system', -'minibuffer-local-must-match-filename-map', 'mouse-major-mode-menu', -'mouse-popup-menubar', 'mouse-popup-menubar-stuff', -'newsticker-groups-filename', 'non-iso-charset-alist', -'nonascii-insert-offset', 'nonascii-translation-table', -'password-read-and-add', 'pre-abbrev-expand-hook', -'process-filter-multibyte-p', 'remember-buffer' (function), +'minibuffer-local-must-match-filename-map', 'mouse-choose-completion', +'mouse-major-mode-menu', 'mouse-popup-menubar', +'mouse-popup-menubar-stuff', 'newsticker-groups-filename', +'non-iso-charset-alist', 'nonascii-insert-offset', +'nonascii-translation-table', 'password-read-and-add', +'pre-abbrev-expand-hook', 'princ-list', 'print-help-return-message', +'process-filter-multibyte-p', 'read-file-name-predicate', +'remember-buffer' (function), 'rmail-highlight-face', 'rmail-message-filter', 'set-coding-priority', -'set-process-filter-multibyte', 'shell-dirtrack-toggle', -'t-mouse-mode', 'tooltip-hook', 'tpu-have-ispell', +'set-process-filter-multibyte', 'shadows-compare-text-p', +'shell-dirtrack-toggle', 't-mouse-mode', +'term-dynamic-simple-complete', 'tooltip-hook', 'tpu-have-ispell', 'url-generate-unique-filename', 'url-temporary-directory', -'vc-arch-command', 'vc-default-working-revision' (variable), +'vc-arch-command', 'vc-default-working-revision (variable)', 'vc-mtn-command', 'vc-revert-buffer', 'vc-workfile-version', 'vcursor-toggle-vcursor-map', 'w32-focus-frame', 'w32-select-font'. diff --git a/lisp/allout.el b/lisp/allout.el index 05d9153a31..955b7000cb 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -62,8 +62,7 @@ ;; The outline menubar additions provide quick reference to many of the ;; features. See the docstring of the variables `allout-layout' and ;; `allout-auto-activation' for details on automatic activation of -;; `allout-mode' as a minor mode. (`allout-init' is deprecated in favor of -;; a purely customization-based method.) +;; `allout-mode' as a minor mode. ;; ;; Note -- the lines beginning with `;;;_' are outline topic headers. ;; Customize `allout-auto-activation' to enable, then revisit this @@ -1627,18 +1626,6 @@ allout-explicitly-deactivated "If t, `allout-mode's last deactivation was deliberate. So `allout-post-command-business' should not reactivate it...") (make-variable-buffer-local 'allout-explicitly-deactivated) -;;;_ > allout-init (mode) -(defun allout-init (mode) - "DEPRECATED - configure allout activation by customizing -`allout-auto-activation'. This function remains around, limited -from what it did before, for backwards compatibility. - -MODE is the activation mode - see `allout-auto-activation' for -valid values." - (declare (obsolete allout-auto-activation "23.3")) - (customize-set-variable 'allout-auto-activation (format "%s" mode)) - (format "%s" mode)) - ;;;_ > allout-setup-menubar () (defun allout-setup-menubar () "Populate the current buffer's menubar with `allout-mode' stuff." diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index 604fc40926..44cce389cb 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el @@ -38,7 +38,7 @@ ;; "Calculate something complicated at point, and return it." ;; (interactive) ;; function not normally interactive ;; (let ((stuff (do-stuff))) -;; (when (interactive-p) +;; (when (called-interactively-p 'interactive) ;; (data-debug-show-stuff stuff "myStuff")) ;; stuff)) diff --git a/lisp/comint.el b/lisp/comint.el index df4937a7d6..9460009bf4 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3442,7 +3442,7 @@ comint-dynamic-list-completions (eq (window-buffer (posn-window (event-start first))) (get-buffer "*Completions*")) (memq (key-binding key) - '(mouse-choose-completion choose-completion)))) + '(choose-completion)))) ;; If the user does choose-completion with the mouse, ;; execute the command, then delete the completion window. (progn diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index d9bbf6129c..7ff6d68c3e 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1229,7 +1229,7 @@ edebug-wrap-def-body "Wrap the FORMS of a definition body." (if edebug-def-interactive `(let ((,(edebug-interactive-p-name) - (interactive-p))) + (called-interactively-p 'interactive))) ,(edebug-make-enter-wrapper forms)) (edebug-make-enter-wrapper forms))) diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 4ff129e367..dd614dd792 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -55,9 +55,6 @@ lisp-shadow :prefix "load-path-shadows-" :group 'lisp) -(define-obsolete-variable-alias 'shadows-compare-text-p - 'load-path-shadows-compare-text "23.3") - (defcustom load-path-shadows-compare-text nil "If non-nil, then shadowing files are reported only if their text differs. This is slower, but filters out some innocuous shadowing." diff --git a/lisp/ffap.el b/lisp/ffap.el index 4a506207d5..97e55df65c 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -110,8 +110,6 @@ (require 'url-parse) (require 'thingatpt) -(define-obsolete-variable-alias 'ffap-version 'emacs-version "23.2") - (defgroup ffap nil "Find file or URL at point." :group 'matching diff --git a/lisp/filecache.el b/lisp/filecache.el index 3c07a49420..113d28cf75 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el @@ -614,9 +614,6 @@ file-cache-choose-completion (select-window (active-minibuffer-window)) (file-cache-minibuffer-complete nil))) -(define-obsolete-function-alias 'file-cache-mouse-choose-completion - #'file-cache-choose-completion "23.2") - (defun file-cache-complete () "Complete the word at point, using the filecache." (interactive) diff --git a/lisp/help.el b/lisp/help.el index b7d867eb70..1b0149616f 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -131,7 +131,6 @@ help-return-method (WINDOW . quit-window) do quit-window, then select WINDOW. (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") -(define-obsolete-function-alias 'print-help-return-message 'help-print-return-message "23.2") (defun help-print-return-message (&optional function) "Display or return message saying how to restore windows after help command. This function assumes that `standard-output' is the help buffer. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 948e62e10d..534609932c 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -709,7 +709,7 @@ image-mode-to-text displays an image file as text." ;; image-mode-as-text = normal-mode + image-minor-mode (let ((previous-image-type image-type)) ; preserve `image-type' - (major-mode-restore '(image-mode image-mode-maybe image-mode-as-text)) + (major-mode-restore '(image-mode image-mode-as-text)) ;; Restore `image-type' after `kill-all-local-variables' in `normal-mode'. (setq image-type previous-image-type) ;; Enable image minor mode with `C-c C-c'. @@ -759,8 +759,6 @@ image-mode-as-text (if (image-get-display-property) "text" "an image or hex") "."))) -(define-obsolete-function-alias 'image-mode-maybe 'image-mode "23.2") - (defun image-toggle-display-text () "Show the image file as text. Remove text properties that display the image." diff --git a/lisp/imenu.el b/lisp/imenu.el index 1949f2f48f..3a16dcb9ac 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -316,28 +316,6 @@ imenu-progress-message ) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;; -;;;; Some examples of functions utilizing the framework of this -;;;; package. -;;;; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; FIXME: This was the only imenu-example-* definition actually used, -;; by cperl-mode.el. Now cperl-mode has its own copy, so these can -;; all be removed. -(defun imenu-example--name-and-position () - "Return the current/previous sexp and its (beginning) location. -Don't move point." - (declare (obsolete "use your own function instead." "23.2")) - (save-excursion - (forward-sexp -1) - ;; [ydi] modified for imenu-use-markers - (let ((beg (if imenu-use-markers (point-marker) (point))) - (end (progn (forward-sexp) (point)))) - (cons (buffer-substring beg end) - beg)))) - ;;; ;;; Lisp ;;; diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 5fe931dd9b..02dacaf0a2 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -2070,12 +2070,6 @@ set-language-environment-unibyte "Do various unibyte-mode setups for language environment LANGUAGE-NAME." (set-display-table-and-terminal-coding-system language-name)) -(defun princ-list (&rest args) - "Print all arguments with `princ', then print \"\\n\"." - (declare (obsolete "use mapc and princ instead." "23.3")) - (mapc #'princ args) - (princ "\n")) - (put 'describe-specified-language-support 'apropos-inhibit t) ;; Print language-specific information such as input methods, diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 312baffb90..f14025a93a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -417,20 +417,6 @@ rmail-highlight :group 'rmail-headers :version "22.1") -;; This was removed in Emacs 23.1 with no notification, an unnecessary -;; incompatible change. -(defcustom rmail-highlight-face 'rmail-highlight - "Face used by Rmail for highlighting headers." - ;; Note that nil doesn't actually mean use the default face, it - ;; means use either bold or highlight. It's not worth fixing this - ;; now that this is obsolete. - :type '(choice (const :tag "Default" nil) - face) - :group 'rmail-headers) -(make-obsolete-variable 'rmail-highlight-face - "customize the face `rmail-highlight' instead." - "23.2") - (defface rmail-header-name '((t (:inherit font-lock-function-name-face))) "Face to use for highlighting the header names. @@ -3012,7 +2998,7 @@ rmail-redecode-body (defun rmail-highlight-headers () "Highlight the headers specified by `rmail-highlighted-headers'. -Uses the face specified by `rmail-highlight-face'." +Uses the face `rmail-highlight'." (if rmail-highlighted-headers (save-excursion (search-forward "\n\n" nil 'move) @@ -3020,11 +3006,7 @@ rmail-highlight-headers (narrow-to-region (point-min) (point)) (let ((case-fold-search t) (inhibit-read-only t) - ;; When rmail-highlight-face is removed, just - ;; use 'rmail-highlight here. - (face (or rmail-highlight-face - (if (face-differs-from-default-p 'bold) - 'bold 'highlight))) + (face 'rmail-highlight) ;; List of overlays to reuse. (overlays rmail-overlay-list)) (goto-char (point-min)) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 641a2e5315..1f2dcc4755 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2539,11 +2539,6 @@ completion-file-name-table all)))))) (file-error nil))) ;PCM often calls with invalid directories. -(defvar read-file-name-predicate nil - "Current predicate used by `read-file-name-internal'.") -(make-obsolete-variable 'read-file-name-predicate - "use the regular PRED argument" "23.2") - (defun completion--sifn-requote (upos qstr) ;; We're looking for `qpos' such that: ;; (equal (substring (substitute-in-file-name qstr) 0 upos) diff --git a/lisp/mouse.el b/lisp/mouse.el index a06ca2a56c..06fdca12b9 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -2303,9 +2303,6 @@ mouse-buffer-menu-split ;; Few buffers--put them all in one pane. (list (cons title alist)))) -(define-obsolete-function-alias - 'mouse-choose-completion 'choose-completion "23.2") - ;; Font selection. (defun font-menu-add-default () diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index bf56a7ee49..24e1f8831a 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -695,7 +695,7 @@ antlr-mode-map (define-key map "\e\C-e" 'antlr-end-of-rule) (define-key map "\C-c\C-a" 'antlr-beginning-of-body) (define-key map "\C-c\C-e" 'antlr-end-of-body) - (define-key map "\C-c\C-f" 'c-forward-into-nomenclature) + (define-key map "\C-c\C-f" 'subword-forward) (define-key map "\C-c\C-b" 'c-backward-into-nomenclature) (define-key map "\C-c\C-c" 'comment-region) (define-key map "\C-c\C-v" 'antlr-hide-actions) @@ -745,7 +745,7 @@ antlr-mode-menu ["Backward Statement" c-beginning-of-statement t] ["Forward Statement" c-end-of-statement t] ["Backward Into Nomencl." c-backward-into-nomenclature t] - ["Forward Into Nomencl." c-forward-into-nomenclature t]) + ["Forward Into Nomencl." subword-forward t]) ["Indent Region" indent-region :active (and (not buffer-read-only) (c-region-is-active-p))] ["Comment Out Region" comment-region diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 1b557c41a5..4425e275ac 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1554,19 +1554,6 @@ c-toggle-cpp-indent-to-body (declare-function c-backward-subword "ext:cc-subword" (&optional arg)) ;; "nomenclature" functions + c-scope-operator. -(defun c-forward-into-nomenclature (&optional arg) - "Compatibility alias for `c-forward-subword'." - (interactive "p") - (if (fboundp 'subword-mode) - (progn - (require 'subword) - (subword-forward arg)) - (require 'cc-subword) - (c-forward-subword arg))) -(make-obsolete 'c-forward-into-nomenclature - (if (fboundp 'subword-mode) 'subword-forward 'c-forward-subword) - "23.2") - (defun c-backward-into-nomenclature (&optional arg) "Compatibility alias for `c-backward-subword'." (interactive "p") diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index f7e53ec02d..2d591dd91d 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -7118,7 +7118,7 @@ idlwave-default-choose-completion (apply 'idlwave-choose 'default-choose-completion args)) (defun idlwave-make-modified-completion-map-xemacs (old-map) - "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." + "Replace `choose-completion' in OLD-MAP." (let ((new-map (copy-keymap old-map))) (define-key new-map [button3up] 'idlwave-mouse-completion-help) (define-key new-map [button3] (lambda () @@ -7141,12 +7141,10 @@ idlwave-display-completion-list-emacs (current-local-map))))))) (defun idlwave-make-modified-completion-map-emacs (old-map) - "Replace `choose-completion' and `mouse-choose-completion' in OLD-MAP." + "Replace `choose-completion' in OLD-MAP." (let ((new-map (copy-keymap old-map))) (substitute-key-definition 'choose-completion 'idlwave-choose-completion new-map) - (substitute-key-definition - 'mouse-choose-completion 'idlwave-mouse-choose-completion new-map) (define-key new-map [mouse-3] 'idlwave-mouse-completion-help) new-map)) @@ -7155,11 +7153,6 @@ idlwave-choose-completion (interactive (list last-nonmenu-event)) (apply 'idlwave-choose 'choose-completion args)) -(defun idlwave-mouse-choose-completion (&rest args) - "Click on an alternative in the `*Completions*' buffer to choose it." - (interactive "e") - (apply 'idlwave-choose 'mouse-choose-completion args)) - ;;---------------------------------------------------------------------- ;;---------------------------------------------------------------------- diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 9cd84cf713..3d66483b83 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -2304,10 +2304,6 @@ vhdl-last-input-event (defvaralias 'vhdl-last-input-event 'last-input-char) (defvaralias 'vhdl-last-input-event 'last-input-event)) -;; `help-print-return-message' changed to `print-help-return-message' in Emacs -;;;(unless (fboundp 'help-print-return-message) -;;; (defalias 'help-print-return-message 'print-help-return-message)) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compatibility with older VHDL Mode versions diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index 8dfb3a40dd..c6997862f7 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el @@ -446,8 +446,6 @@ xscheme-enter-interaction-mode (scheme-interaction-mode-initialize) (scheme-interaction-mode t))))) -(define-obsolete-function-alias 'advertised-xscheme-send-previous-expression - 'xscheme-send-previous-expression "23.2") ;;;; Debugger Mode diff --git a/lisp/simple.el b/lisp/simple.el index 1cb93c5722..5a8816c8d6 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5052,7 +5052,8 @@ append-next-kill The argument is used for internal purposes; do not supply one." (interactive "p") - ;; We don't use (interactive-p), since that breaks kbd macros. + ;; We don't use (called-interactively-p 'interactive), since that + ;; breaks kbd macros. (if interactive (progn (setq this-command 'kill-region) @@ -6114,8 +6115,6 @@ pop-mark (pop mark-ring)) (deactivate-mark)) -(define-obsolete-function-alias - 'exchange-dot-and-mark 'exchange-point-and-mark "23.3") (defun exchange-point-and-mark (&optional arg) "Put the mark where point is now, and point where the mark is now. This command works even when the mark is not active, @@ -8400,18 +8399,6 @@ completion-list-insert-choice-function between BEG and END with TEXT. Expected to be set buffer-locally in the *Completions* buffer.") -(defvar completion-base-size nil - "Number of chars before point not involved in completion. -This is a local variable in the completion list buffer. -It refers to the chars in the minibuffer if completing in the -minibuffer, or in `completion-reference-buffer' otherwise. -Only characters in the field at point are included. - -If nil, Emacs determines which part of the tail end of the -buffer's text is involved in completion by comparing the text -directly.") -(make-obsolete-variable 'completion-base-size 'completion-base-position "23.2") - (defun delete-completion-window () "Delete the completion list window. Go to the window from which completion was requested." @@ -8465,7 +8452,6 @@ choose-completion (run-hooks 'mouse-leave-buffer-hook) (with-current-buffer (window-buffer (posn-window (event-start event))) (let ((buffer completion-reference-buffer) - (base-size completion-base-size) (base-position completion-base-position) (insert-function completion-list-insert-choice-function) (choice @@ -8492,10 +8478,6 @@ choose-completion (choose-completion-string choice buffer (or base-position - (when base-size - ;; Someone's using old completion code that doesn't know - ;; about base-position yet. - (list (+ base-size (field-beginning)))) ;; If all else fails, just guess. (list (choose-completion-guess-base-position choice))) insert-function))))) @@ -8523,10 +8505,6 @@ choose-completion-guess-base-position (forward-char 1)) (point)))) -(defun choose-completion-delete-max-match (string) - (declare (obsolete choose-completion-guess-base-position "23.2")) - (delete-region (choose-completion-guess-base-position string) (point))) - (defvar choose-completion-string-functions nil "Functions that may override the normal insertion of a completion choice. These functions are called in order with three arguments: @@ -8555,13 +8533,6 @@ choose-completion-string ;; unless it is reading a file name and CHOICE is a directory, ;; or completion-no-auto-exit is non-nil. - ;; Some older code may call us passing `base-size' instead of - ;; `base-position'. It's difficult to make any use of `base-size', - ;; so we just ignore it. - (unless (consp base-position) - (message "Obsolete `base-size' passed to choose-completion-string") - (setq base-position nil)) - (let* ((buffer (or buffer completion-reference-buffer)) (mini-p (minibufferp buffer))) ;; If BUFFER is a minibuffer, barf unless it's the currently @@ -8617,8 +8588,7 @@ completion-list-mode to select the completion near point. Or click to select one with the mouse. -\\{completion-list-mode-map}" - (set (make-local-variable 'completion-base-size) nil)) +\\{completion-list-mode-map}") (defun completion-list-mode-finish () "Finish setup of the completions buffer. @@ -8655,14 +8625,11 @@ completion-setup-function (if minibuffer-completing-file-name (file-name-as-directory (expand-file-name - (buffer-substring (minibuffer-prompt-end) - (- (point) (or completion-base-size 0)))))))) + (buffer-substring (minibuffer-prompt-end) (point))))))) (with-current-buffer standard-output - (let ((base-size completion-base-size) ;Read before killing localvars. - (base-position completion-base-position) + (let ((base-position completion-base-position) (insert-fun completion-list-insert-choice-function)) (completion-list-mode) - (set (make-local-variable 'completion-base-size) base-size) (set (make-local-variable 'completion-base-position) base-position) (set (make-local-variable 'completion-list-insert-choice-function) insert-fun)) diff --git a/lisp/subr.el b/lisp/subr.el index 8eb4cf452d..f86d0e00f4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4669,13 +4669,6 @@ do-after-load-evaluation ;; Finally, run any other hook. (run-hook-with-args 'after-load-functions abs-file)) -(defun eval-next-after-load (file) - "Read the following input sexp, and run it whenever FILE is loaded. -This makes or adds to an entry on `after-load-alist'. -FILE should be the name of a library, with no directory name." - (declare (obsolete eval-after-load "23.2")) - (eval-after-load file (read))) - (defun display-delayed-warnings () "Display delayed warnings from `delayed-warnings-list'. @@ -5135,29 +5128,6 @@ called-interactively-p . ,_)) t))))) -(defun interactive-p () - "Return t if the containing function was run directly by user input. -This means that the function was called with `call-interactively' -\(which includes being called as the binding of a key) -and input is currently coming from the keyboard (not a keyboard macro), -and Emacs is not running in batch mode (`noninteractive' is nil). - -The only known proper use of `interactive-p' is in deciding whether to -display a helpful message, or how to display it. If you're thinking -of using it for any other purpose, it is quite likely that you're -making a mistake. Think: what do you want to do when the command is -called from a keyboard macro or in batch mode? - -To test whether your function was called with `call-interactively', -either (i) add an extra optional argument and give it an `interactive' -spec that specifies non-nil unconditionally (such as \"p\"); or (ii) -use `called-interactively-p'. - -To test whether a function can be called interactively, use -`commandp'." - (declare (obsolete called-interactively-p "23.2")) - (called-interactively-p 'interactive)) - (defun internal-push-keymap (keymap symbol) (let ((map (symbol-value symbol))) (unless (memq keymap map) diff --git a/lisp/term.el b/lisp/term.el index 149405fa41..40c8481fdf 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -4102,53 +4102,6 @@ term-replace-by-expanded-filename (term-dynamic-complete-filename)) -(defun term-dynamic-simple-complete (stub candidates) - "Dynamically complete STUB from CANDIDATES list. -This function inserts completion characters at point by completing STUB from -the strings in CANDIDATES. A completions listing may be shown in a help buffer -if completion is ambiguous. - -Returns nil if no completion was inserted. -Returns `sole' if completed with the only completion match. -Returns `shortest' if completed with the shortest of the completion matches. -Returns `partial' if completed as far as possible with the completion matches. -Returns `listed' if a completion listing was shown. - -See also `term-dynamic-complete-filename'." - (declare (obsolete completion-in-region "23.2")) - (let* ((completion-ignore-case nil) - (completions (all-completions stub candidates))) - (cond ((null completions) - (message "No completions of %s" stub) - nil) - ((= 1 (length completions)) ; Gotcha! - (let ((completion (car completions))) - (if (string-equal completion stub) - (message "Sole completion") - (insert (substring completion (length stub))) - (message "Completed")) - (when term-completion-addsuffix (insert " ")) - 'sole)) - (t ; There's no unique completion. - (let ((completion (try-completion stub candidates))) - ;; Insert the longest substring. - (insert (substring completion (length stub))) - (cond ((and term-completion-recexact term-completion-addsuffix - (string-equal stub completion) - (member completion completions)) - ;; It's not unique, but user wants shortest match. - (insert " ") - (message "Completed shortest") - 'shortest) - ((or term-completion-autolist - (string-equal stub completion)) - ;; It's not unique, list possible completions. - (term-dynamic-list-completions completions) - 'listed) - (t - (message "Partially completed") - 'partial))))))) - (defun term-dynamic-list-filename-completions () "List in help buffer possible completions of the filename at point." (interactive) @@ -4178,7 +4131,7 @@ term-dynamic-list-completions (eq (window-buffer (posn-window (event-start first))) (get-buffer "*Completions*")) (memq (key-binding key) - '(mouse-choose-completion choose-completion)))) + '(choose-completion)))) ;; If the user does choose-completion with the mouse, ;; execute the command, then delete the completion window. (progn diff --git a/test/manual/cedet/cedet-utests.el b/test/manual/cedet/cedet-utests.el index 124b49907d..ee6be438dd 100644 --- a/test/manual/cedet/cedet-utests.el +++ b/test/manual/cedet/cedet-utests.el @@ -150,7 +150,7 @@ cedet-utest ;; Cleanup stray input and events that are in the way. ;; Not doing this causes sit-for to not refresh the screen. ;; Doing this causes the user to need to press keys more frequently. - (when (and (interactive-p) (input-pending-p)) + (when (and (called-interactively-p 'interactive) (input-pending-p)) (if (fboundp 'read-event) (read-event) (read-char))) @@ -497,11 +497,11 @@ pulse-test (error (concat "Pulse test only works on versions of Emacs" " that support pulsing"))) ;; Run the tests - (when (interactive-p) + (when (called-interactively-p 'interactive) (message " Pulse one line.") (read-char)) (pulse-momentary-highlight-one-line (point)) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message " Pulse a region.") (read-char)) (pulse-momentary-highlight-region (point) @@ -510,11 +510,11 @@ pulse-test (forward-char 30) (error nil)) (point))) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message " Pulse line a specific color.") (read-char)) (pulse-momentary-highlight-one-line (point) 'mode-line) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message " Pulse a pre-existing overlay.") (read-char)) (let* ((start (point-at-bol)) @@ -530,7 +530,7 @@ pulse-test (delete-overlay o) (error "Non-temporary overlay was deleted!")) ) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Done!")))) (provide 'cedet-utests) diff --git a/test/manual/cedet/semantic-tests.el b/test/manual/cedet/semantic-tests.el index 53552be06b..a0899cb932 100644 --- a/test/manual/cedet/semantic-tests.el +++ b/test/manual/cedet/semantic-tests.el @@ -235,7 +235,7 @@ semantic-lex-spp-write-utest (set-buffer buff) (semantic-lex-spp-write-test) (kill-buffer buff) - (when (not (interactive-p)) + (when (not (called-interactively-p 'interactive)) (kill-buffer "*SPP Write Test*")) ))) @@ -276,7 +276,7 @@ semantic-symref-test-count-hits-in-tag target (lambda (start end prefix) (setq Lcount (1+ Lcount))) (semantic-tag-start tag) (semantic-tag-end tag)) - (when (interactive-p) + (when (called-interactively-p 'interactive) (message "Found %d occurrences of %s in %.2f seconds" Lcount (semantic-tag-name target) (semantic-elapsed-time start nil))) -- 2.28.0