From a5f2b6ec3b678103c81e14375dd1a8d4bda268d8 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 24 Sep 2012 20:23:25 +0800 Subject: [PATCH] Remove several obsolete vars and functions unlikely to be still in use. * lisp/vc/log-edit.el (cvs-changelog-full-paragraphs) (cvs-commit-buffer-require-final-newline): Obsolete variables removed. * lisp/font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. * lisp/international/mule.el (set-char-table-default): Remove. (set-coding-priority, make-coding-system, generic-char-p) (charset-list, charset-bytes, charset-id): Use declare to mark obsolete. * lisp/mail/supercite.el (sc-version): Remove obsolete function. (sc-describe): Don't mark as obsolete, since it is bound. (sc-submit-bug-report): Remove. * lisp/progmodes/compile.el (compile-internal): Remove obsolete function. (compilation-parse-errors-function): Fix typo. * lisp/vc/emerge.el (emerge-mode): Make it an obsolete alias. (emerge-version): Remove. * lisp/vc/pcvs-defs.el (cvs-buffer-name-alist) (cvs-invert-ignore-marks): Remove references to obsolete vars. * lisp/vc/vc-hooks.el (vc-default-registered): Don't use vc-master-templates. * lisp/vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks) * lisp/vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates) * lisp/vc/vc.el (vc-checkout-carefully): Likewise. * src/chartab.c (Fset_char_table_default): Obsolete function removed. --- etc/NEWS | 12 ++++++++++++ lisp/ChangeLog | 31 +++++++++++++++++++++++++++++++ lisp/font-lock.el | 4 ++-- lisp/international/mule.el | 16 ++++++---------- lisp/mail/supercite.el | 22 ---------------------- lisp/progmodes/compile.el | 24 ++---------------------- lisp/vc/emerge.el | 12 ------------ lisp/vc/log-edit.el | 10 ---------- lisp/vc/pcvs-defs.el | 14 ++------------ lisp/vc/vc-hooks.el | 23 +---------------------- lisp/vc/vc.el | 10 ---------- src/ChangeLog | 4 ++++ src/chartab.c | 10 ---------- 13 files changed, 60 insertions(+), 132 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index b42fbe40e12..8dd419dd73f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -660,6 +660,18 @@ are deprecated and will be removed eventually. *** `facemenu-unlisted-faces' *** `rmail-decode-mime-charset' *** `last-input-char', `last-command-char', `unread-command-char'. +*** `iswitchb-read-buffer' +*** `sc-version', `sc-submit-bug-report' +*** `set-char-table-default' +*** `compile-internal' +*** `cvs-commit-buffer-require-final-newline' +(use `'log-edit-require-final-newline'instead) +*** `cvs-changelog-full-paragraphs' +(use `log-edit-changelog-full-paragraphs' instead) +*** `cvs-diff-ignore-marks', `cvs-diff-buffer-name' +*** `vc-ignore-vc-files' (use `vc-handled-backends' instead) +*** `vc-master-templates' (use `vc-handled-backends' instead) +*** `vc-checkout-carefully' * Lisp changes in Emacs 24.3 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95c9b7930af..7d886bd144a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,36 @@ 2012-09-24 Chong Yidong + * iswitchb.el (iswitchb-read-buffer): Move + iswitchb-define-mode-map code here, and delete that obsolete + function. + + * mail/supercite.el (sc-version): Remove obsolete function. + (sc-describe): Don't mark as obsolete, since it is bound. + (sc-submit-bug-report): Remove. + + * vc/log-edit.el (cvs-changelog-full-paragraphs) + (cvs-commit-buffer-require-final-newline): Remove. + + * vc/pcvs-defs.el (cvs-diff-buffer-name, cvs-diff-ignore-marks) + * vc/vc-hooks.el (vc-ignore-vc-files, vc-master-templates) + * vc/vc.el (vc-checkout-carefully): Likewise. + + * vc/emerge.el (emerge-mode): Make it an obsolete alias. + (emerge-version): Remove. + + * progmodes/compile.el (compile-internal): Remove. + (compilation-parse-errors-function): Fix typo. + + * international/mule.el (set-char-table-default): Remove. + (set-coding-priority, make-coding-system, generic-char-p) + (charset-list, charset-bytes, charset-id): Use declare to mark + functions as obsolete. + + * vc/pcvs-defs.el (cvs-buffer-name-alist) + (cvs-invert-ignore-marks): Remove references to obsolete vars. + * vc/vc-hooks.el (vc-default-registered): Don't use + vc-master-templates. + * font-lock.el (font-lock-reference-face): Use define-obsolete-variable-alias. diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6404af7703a..78760c015ff 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -340,8 +340,8 @@ This can be an \"!\" or the \"n\" in \"ifndef\".") (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face "Face name to use for preprocessor directives.") -(defvar font-lock-reference-face 'font-lock-constant-face) -(make-obsolete-variable 'font-lock-reference-face 'font-lock-constant-face "20.3") +(define-obsolete-variable-alias + 'font-lock-reference-face 'font-lock-constant-face "20.3") ;; Fontification variables: diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 4d567a6e9d8..e6e3f045a9e 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -409,13 +409,13 @@ PLIST (property list) may contain any type of information a user (defun charset-id (charset) "Always return 0. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) 0) -(make-obsolete 'charset-id "do not use it." "23.1") (defmacro charset-bytes (charset) "Always return 0. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) 0) -(make-obsolete 'charset-bytes "do not use it." "23.1") (defun get-charset-property (charset propname) "Return the value of CHARSET's PROPNAME property. @@ -464,8 +464,8 @@ Return -1 if charset isn't an ISO 2022 one." (defun charset-list () "Return list of all charsets ever defined." + (declare (obsolete charset-list "23.1")) charset-list) -(make-obsolete 'charset-list "use variable `charset-list'." "23.1") ;;; CHARACTER @@ -473,8 +473,8 @@ Return -1 if charset isn't an ISO 2022 one." (defun generic-char-p (char) "Always return nil. This is provided for backward compatibility." + (declare (obsolete nil "23.1")) nil) -(make-obsolete 'generic-char-p "generic characters no longer exist." "23.1") (defun make-char-internal (charset-id &optional code1 code2) (let ((charset (aref emacs-mule-charset-table charset-id))) @@ -1012,6 +1012,7 @@ Value is a list of transformed arguments." eol-type) "Define a new coding system CODING-SYSTEM (symbol). This function is provided for backward compatibility." + (declare (obsolete define-coding-system "23.1")) ;; For compatibility with XEmacs, we check the type of TYPE. If it ;; is a symbol, perhaps, this function is called with XEmacs-style ;; arguments. Here, try to transform that kind of arguments to @@ -1104,8 +1105,6 @@ This function is provided for backward compatibility." (apply 'define-coding-system coding-system doc-string properties)) -(make-obsolete 'make-coding-system 'define-coding-system "23.1") - (defun merge-coding-systems (first second) "Fill in any unspecified aspects of coding system FIRST from SECOND. Return the resulting coding system." @@ -1449,9 +1448,9 @@ This setting is effective for the next communication only." ARG is a list of coding categories ordered by priority. This function is provided for backward compatibility." + (declare (obsolete set-coding-system-priority "23.1")) (apply 'set-coding-system-priority (mapcar #'(lambda (x) (symbol-value x)) arg))) -(make-obsolete 'set-coding-priority 'set-coding-system-priority "23.1") ;;; X selections @@ -2356,9 +2355,6 @@ Analogous to `define-translation-table', but updates (setq ignore-relative-composition (make-char-table 'ignore-relative-composition)) -(make-obsolete 'set-char-table-default - "generic characters no longer exist." "23.1") - ;;; Built-in auto-coding-functions: (defun sgml-xml-auto-coding-function (size) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index d10b073eb12..99e5df82bef 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -506,8 +506,6 @@ string." ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;; end user configuration variables -(define-obsolete-variable-alias 'sc-version 'emacs-version "23.1") - (defvar sc-mail-info nil "Alist of mail header information gleaned from reply buffer.") (defvar sc-attributions nil @@ -559,10 +557,8 @@ string." (define-key map "r" 'sc-recite-region) (define-key map "\C-p" 'sc-raw-mode-toggle) (define-key map "u" 'sc-uncite-region) - (define-key map "v" 'sc-version) (define-key map "w" 'sc-insert-reference) (define-key map "\C-t" sc-T-keymap) - (define-key map "\C-b" 'sc-submit-bug-report) (define-key map "?" 'sc-describe) map) "Keymap for Supercite quasi-mode.") @@ -1969,29 +1965,11 @@ cited." (insert (sc-mail-field "sc-citation")) (error "Line is already cited")))) -;; The argument logic here is crazy. -(defun sc-version (message) - "Return the current Supercite version. -If MESSAGE is non-nil (interactively, with no prefix argument), -echoes the version in the minibuffer. Otherwise, inserts the -version at point." - (interactive (list (not current-prefix-arg))) - (let ((verstr (format "Using Supercite.el %s" emacs-version))) - (if message - (message verstr) - (insert "`sc-version' says: " verstr)))) - -(make-obsolete 'sc-version 'emacs-version "23.1") - (defun sc-describe () "Read the Supercite info node." (interactive) (info "(SC)top")) -(make-obsolete 'sc-describe "read the SC manual using `info'." "23.1") - -(define-obsolete-function-alias 'sc-submit-bug-report 'report-emacs-bug "23.1") - ;; useful stuff (provide 'supercite) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 95b8758ba80..09fba380f15 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -748,12 +748,10 @@ Faces `compilation-error-face', `compilation-warning-face', (defvar compilation-leave-directory-face 'font-lock-builtin-face "Face name to use for leaving directory messages.") - - ;; Used for compatibility with the old compile.el. (defvar compilation-parse-errors-function nil) -(make-obsolete 'compilation-parse-errors-function - 'compilation-error-regexp-alist "24.1") +(make-obsolete-variable 'compilation-parse-errors-function + 'compilation-error-regexp-alist "24.1") (defcustom compilation-auto-jump-to-first-error nil "If non-nil, automatically jump to the first error during compilation." @@ -1499,24 +1497,6 @@ Otherwise, construct a buffer name from NAME-OF-MODE." (t (concat "*" (downcase name-of-mode) "*")))) -;; This is a rough emulation of the old hack, until the transition to new -;; compile is complete. -(defun compile-internal (command error-message - &optional _name-of-mode parser - error-regexp-alist name-function - _enter-regexp-alist _leave-regexp-alist - file-regexp-alist _nomessage-regexp-alist - _no-async highlight-regexp _local-map) - (if parser - (error "Compile now works very differently, see `compilation-error-regexp-alist'")) - (let ((compilation-error-regexp-alist - (append file-regexp-alist (or error-regexp-alist - compilation-error-regexp-alist))) - (compilation-error (replace-regexp-in-string "^No more \\(.+\\)s\\.?" - "\\1" error-message))) - (compilation-start command nil name-function highlight-regexp))) -(make-obsolete 'compile-internal 'compilation-start "22.1") - (defcustom compilation-always-kill nil "If t, always kill a running compilation process before starting a new one. If nil, ask to kill it." diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el index f6942bc538d..0a1bd044125 100644 --- a/lisp/vc/emerge.el +++ b/lisp/vc/emerge.el @@ -76,18 +76,6 @@ Commands: Commands must be prefixed by \\\\[emerge-basic-keymap] in `edit' mode, but can be invoked directly in `fast' mode.") -(define-obsolete-variable-alias 'emerge-version 'emacs-version "23.2") - -(defun emerge-version () - "Return string describing the version of Emerge. -When called interactively, displays the version." - (interactive) - (if (called-interactively-p 'interactive) - (message "Emerge version %s" emacs-version) - emacs-version)) - -(make-obsolete 'emerge-version 'emacs-version "23.2") - ;;; Emerge configuration variables (defgroup emerge nil diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 7ee000a8aea..3b4eb4dae02 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -104,11 +104,6 @@ If 'changed, only request confirmation if the list of files has :group 'log-edit :type 'boolean) -(defvar cvs-commit-buffer-require-final-newline t) -(make-obsolete-variable 'cvs-commit-buffer-require-final-newline - 'log-edit-require-final-newline - "21.1") - (defcustom log-edit-require-final-newline cvs-commit-buffer-require-final-newline "Enforce a newline at the end of commit log messages. @@ -154,11 +149,6 @@ can be obtained from `log-edit-files'." :group 'log-edit :version "24.1") -(defvar cvs-changelog-full-paragraphs t) -(make-obsolete-variable 'cvs-changelog-full-paragraphs - 'log-edit-changelog-full-paragraphs - "21.1") - (defvar log-edit-changelog-full-paragraphs cvs-changelog-full-paragraphs "If non-nil, include full ChangeLog paragraphs in the log. This may be set in the ``local variables'' section of a ChangeLog, to diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el index fc65d62c67d..b3c1f8c1343 100644 --- a/lisp/vc/pcvs-defs.el +++ b/lisp/vc/pcvs-defs.el @@ -133,14 +133,9 @@ current line. See also `cvs-invert-ignore-marks'" :group 'pcl-cvs :type '(boolean)) -(defvar cvs-diff-ignore-marks t) -(make-obsolete-variable 'cvs-diff-ignore-marks - 'cvs-invert-ignore-marks - "21.1") - (defcustom cvs-invert-ignore-marks (let ((l ())) - (unless (equal cvs-diff-ignore-marks cvs-default-ignore-marks) + (unless (equal cvs-default-ignore-marks t) (push "diff" l)) (when (and cvs-force-dir-tag (not cvs-default-ignore-marks)) (push "tag" l)) @@ -171,11 +166,6 @@ If set to nil, `cvs-mode-add' will always prompt for a message." :type '(choice (const :tag "Prompt" nil) (string))) -(defvar cvs-diff-buffer-name "*cvs-diff*") -(make-obsolete-variable 'cvs-diff-buffer-name - 'cvs-buffer-name-alist - "21.1") - (defcustom cvs-find-file-and-jump nil "Jump to the modified area when finding a file. If non-nil, `cvs-mode-find-file' will place the cursor at the beginning of @@ -185,7 +175,7 @@ have no effect." :type '(boolean)) (defcustom cvs-buffer-name-alist - '(("diff" cvs-diff-buffer-name diff-mode) + '(("diff" "*cvs-diff*" diff-mode) ("status" "*cvs-info*" cvs-status-mode) ("tree" "*cvs-info*" cvs-status-mode) ("message" "*cvs-commit*" nil log-edit) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 54c33769267..cac3eb559a1 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -34,18 +34,6 @@ ;; Customization Variables (the rest is in vc.el) -(defvar vc-ignore-vc-files nil) -(make-obsolete-variable 'vc-ignore-vc-files - "set `vc-handled-backends' to nil to disable VC." - "21.1") - -(defvar vc-master-templates ()) -(make-obsolete-variable 'vc-master-templates - "to define master templates for a given BACKEND, use -vc-BACKEND-master-templates. To enable or disable VC for a given -BACKEND, use `vc-handled-backends'." - "21.1") - (defcustom vc-ignore-dir-regexp ;; Stop SMB, automounter, AFS, and DFS host lookups. locate-dominating-stop-dir-regexp @@ -586,16 +574,7 @@ If FILE is not registered, this function always returns nil." "Check if FILE is registered in BACKEND using vc-BACKEND-master-templates." (let ((sym (vc-make-backend-sym backend 'master-templates))) (unless (get backend 'vc-templates-grabbed) - (put backend 'vc-templates-grabbed t) - (set sym (append (delq nil - (mapcar - (lambda (template) - (and (consp template) - (eq (cdr template) backend) - (car template))) - (with-no-warnings - vc-master-templates))) - (symbol-value sym)))) + (put backend 'vc-templates-grabbed t)) (let ((result (vc-check-master-templates file (symbol-value sym)))) (if (stringp result) (vc-file-setprop file 'vc-name result) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 47800bd4aac..3657e221e6a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -808,16 +808,6 @@ is sensitive to blank lines." (string :tag "Comment End"))) :group 'vc) -(defcustom vc-checkout-carefully (= (user-uid) 0) - "Non-nil means be extra-careful in checkout. -Verify that the file really is not locked -and that its contents match what the repository version says." - :type 'boolean - :group 'vc) -(make-obsolete-variable 'vc-checkout-carefully - "the corresponding checks are always done now." - "21.1") - ;; Variables users don't need to see diff --git a/src/ChangeLog b/src/ChangeLog index 6cd3183f191..56a9c0a17ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-09-24 Chong Yidong + + * chartab.c (Fset_char_table_default): Obsolete function removed. + 2012-09-23 Paul Eggert Move pid_t related decls out of lisp.h. diff --git a/src/chartab.c b/src/chartab.c index e864514e336..7430235b4af 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -655,15 +655,6 @@ or a character code. Return VALUE. */) return value; } -DEFUN ("set-char-table-default", Fset_char_table_default, - Sset_char_table_default, 3, 3, 0, - doc: /* -This function is obsolete and has no effect. */) - (Lisp_Object char_table, Lisp_Object ch, Lisp_Object value) -{ - return Qnil; -} - /* Look up the element in TABLE at index CH, and return it as an integer. If the element is not a character, return CH itself. */ @@ -1415,7 +1406,6 @@ syms_of_chartab (void) defsubr (&Sset_char_table_extra_slot); defsubr (&Schar_table_range); defsubr (&Sset_char_table_range); - defsubr (&Sset_char_table_default); defsubr (&Soptimize_char_table); defsubr (&Smap_char_table); defsubr (&Sunicode_property_table_internal);