+2012-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Move define-obsolete-variable-alias before the var's definition.
+ * vc/log-edit.el (vc-comment-ring, vc-comment-ring-index):
+ * tooltip.el (tooltip-hook):
+ * textmodes/reftex-toc.el (reftex-toc-map):
+ * textmodes/reftex-sel.el (reftex-select-label-map)
+ (reftex-select-bib-map):
+ * textmodes/reftex-index.el (reftex-index-map)
+ (reftex-index-phrases-map):
+ * speedbar.el (speedbar-syntax-table, speedbar-key-map):
+ * progmodes/meta-mode.el (meta-mode-map):
+ * novice.el (disabled-command-hook):
+ * loadhist.el (unload-hook-features-list):
+ * frame.el (blink-cursor):
+ * files.el (find-file-not-found-hooks, write-file-hooks)
+ (write-contents-hooks):
+ * emulation/tpu-edt.el (GOLD-map):
+ * emacs-lock.el (emacs-lock-from-exiting):
+ * emacs-lisp/generic.el (generic-font-lock-defaults):
+ * emacs-lisp/chart.el (chart-map):
+ * dos-fns.el (register-name-alist):
+ * dired-x.el (dired-omit-files-p):
+ * desktop.el (desktop-enable):
+ * cus-edit.el (custom-mode-hook):
+ * buff-menu.el (buffer-menu-mode-hook):
+ * bookmark.el (bookmark-read-annotation-text-func)
+ (bookmark-exit-hooks):
+ * allout.el (allout-mode-deactivate-hook)
+ (allout-exposure-change-hook, allout-structure-added-hook)
+ (allout-structure-deleted-hook, allout-structure-shifted-hook):
+ * dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle)
+ (dirtrack-debug): Move call to define-obsolete-variable-alias so it
+ comes before the corresponding variable's definition.
+
2012-05-12 Chong Yidong <cyd@gnu.org>
* buff-menu.el (Buffer-menu-buffer+size-width): Doc fix (Bug#11454).
(defvar allout-mode-hook nil
"Hook run when allout mode starts.")
;;;_ = allout-mode-deactivate-hook
-(defvar allout-mode-deactivate-hook nil
- "Hook run when allout mode ends.")
(define-obsolete-variable-alias 'allout-mode-deactivate-hook
'allout-mode-off-hook "24.1")
+(defvar allout-mode-deactivate-hook nil
+ "Hook run when allout mode ends.")
;;;_ = allout-exposure-category
(defvar allout-exposure-category nil
"Symbol for use as allout invisible-text overlay category.")
;;;_ = allout-exposure-change-functions
+(define-obsolete-variable-alias 'allout-exposure-change-hook
+ 'allout-exposure-change-functions "24.2")
(defcustom allout-exposure-change-functions nil
"Abnormal hook run after allout outline subtree exposure changes.
It is run at the conclusion of `allout-flag-region'.
:group 'allout
:version "24.2")
-(define-obsolete-variable-alias 'allout-exposure-change-hook
- 'allout-exposure-change-functions "24.2")
-
;;;_ = allout-structure-added-functions
+(define-obsolete-variable-alias 'allout-structure-added-hook
+ 'allout-structure-added-functions "24.2")
(defcustom allout-structure-added-functions nil
"Abnormal hook run after adding items to an Allout outline.
Functions on the hook should take two arguments:
:group 'allout
:version "24.2")
-(define-obsolete-variable-alias 'allout-structure-added-hook
- 'allout-structure-added-functions "24.2")
-
;;;_ = allout-structure-deleted-functions
+(define-obsolete-variable-alias 'allout-structure-deleted-hook
+ 'allout-structure-deleted-functions "24.2")
(defcustom allout-structure-deleted-functions nil
"Abnormal hook run after deleting subtrees from an Allout outline.
Functions on the hook must take two arguments:
:group 'allout
:version "24.2")
-(define-obsolete-variable-alias 'allout-structure-deleted-hook
- 'allout-structure-deleted-functions "24.2")
-
;;;_ = allout-structure-shifted-functions
+(define-obsolete-variable-alias 'allout-structure-shifted-hook
+ 'allout-structure-shifted-functions "24.2")
(defcustom allout-structure-shifted-functions nil
"Abnormal hook run after shifting items in an Allout outline.
Functions on the hook should take two arguments:
:group 'allout
:version "24.2")
-(define-obsolete-variable-alias 'allout-structure-shifted-hook
- 'allout-structure-shifted-functions "24.2")
-
;;;_ = allout-after-copy-or-kill-hook
(defcustom allout-after-copy-or-kill-hook nil
"Normal hook run after copying outline text.."
"# Date: " (current-time-string) "\n"))
+(define-obsolete-variable-alias 'bookmark-read-annotation-text-func
+ 'bookmark-edit-annotation-text-func "23.1")
(defvar bookmark-edit-annotation-text-func 'bookmark-default-annotation-text
"Function to return default text to use for a bookmark annotation.
It takes one argument, the name of the bookmark, as a string.")
-(define-obsolete-variable-alias 'bookmark-read-annotation-text-func
- 'bookmark-edit-annotation-text-func "23.1")
(defvar bookmark-edit-annotation-mode-map
(let ((map (make-sparse-keymap)))
"Hook run at the end of loading library `bookmark.el'.")
;; Exit Hook, called from kill-emacs-hook
+(define-obsolete-variable-alias 'bookmark-exit-hooks
+ 'bookmark-exit-hook "22.1")
(defvar bookmark-exit-hook nil
"Hook run when Emacs exits.")
-(define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook "22.1")
-
(defun bookmark-exit-hook-internal ()
"Save bookmark state, if necessary, at Emacs exit time.
This also runs `bookmark-exit-hook'."
map)
"Local keymap for `Buffer-menu-mode' buffers.")
+(define-obsolete-variable-alias 'buffer-menu-mode-hook
+ 'Buffer-menu-mode-hook "23.1")
+
(define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu"
"Major mode for Buffer Menu buffers.
The Buffer Menu is invoked by the commands \\[list-buffers], \\[buffer-menu], and
(lambda (&optional _noconfirm) 'fast))
(add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))
-(define-obsolete-variable-alias 'buffer-menu-mode-hook
- 'Buffer-menu-mode-hook "23.1")
-
(defun buffer-menu (&optional arg)
"Switch to the Buffer Menu.
By default, all buffers are listed except those whose names start
(set (make-local-variable 'widget-link-suffix) ""))
(setq show-trailing-whitespace nil))
+(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
(define-derived-mode Custom-mode nil "Custom"
"Major mode for editing customization buffers.
(Custom-mode))
(make-obsolete 'custom-mode 'Custom-mode "23.1")
(put 'custom-mode 'mode-class 'special)
-(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
(add-to-list 'debug-ignored-errors "^Invalid face:? ")
"Save status of Emacs when you exit."
:group 'frames)
+;; Maintained for backward compatibility
+(define-obsolete-variable-alias 'desktop-enable 'desktop-save-mode "22.1")
;;;###autoload
(define-minor-mode desktop-save-mode
"Toggle desktop saving (Desktop Save mode).
:global t
:group 'desktop)
-;; Maintained for backward compatibility
-(define-obsolete-variable-alias 'desktop-enable
- 'desktop-save-mode "22.1")
-
(defun desktop-save-mode-off ()
"Disable `desktop-save-mode'. Provided for use in hooks."
(desktop-save-mode 0))
:type '(choice (const :tag "no maximum" nil) integer)
:group 'dired-x)
+;; For backward compatibility
+(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1")
(define-minor-mode dired-omit-mode
"Toggle omission of uninteresting files in Dired (Dired-Omit mode).
With a prefix argument ARG, enable Dired-Omit mode if ARG is
(put 'dired-omit-mode 'safe-local-variable 'booleanp)
-;; For backward compatibility
-(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1")
-
(defcustom dired-omit-files "^\\.?#\\|^\\.$\\|^\\.\\.$"
"Filenames matching this regexp will not be displayed.
This only has effect when `dired-omit-mode' is t. See interactive function
dir))
+(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1")
+(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1")
;;;###autoload
(define-minor-mode dirtrack-mode
"Toggle directory tracking in shell buffers (Dirtrack mode).
(add-hook 'comint-preoutput-filter-functions 'dirtrack nil t)
(remove-hook 'comint-preoutput-filter-functions 'dirtrack t)))
-(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1")
-(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1")
-
+(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode
+ "23.1")
+(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1")
(define-minor-mode dirtrack-debug-mode
"Toggle Dirtrack debugging.
With a prefix argument ARG, enable Dirtrack debugging if ARG is
(if dirtrack-debug-mode
(display-buffer (get-buffer-create dirtrack-debug-buffer))))
-(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode
- "23.1")
-(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1")
-
-
(defun dirtrack-debug-message (msg1 msg2)
"Insert strings at the end of `dirtrack-debug-buffer'."
(when dirtrack-debug-mode
(add-hook 'before-init-hook 'dos-reevaluate-defcustoms)
+(define-obsolete-variable-alias
+ 'register-name-alist 'dos-register-name-alist "24.1")
+
(defvar dos-register-name-alist
'((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
(cflag . 6) (flags . 7)
(al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
(ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
-(define-obsolete-variable-alias
- 'register-name-alist 'dos-register-name-alist "24.1")
-
(defun dos-make-register ()
(make-vector 8 0))
(require 'eieio)
;;; Code:
-(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1")
+(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
(defvar chart-local-object nil
"Local variable containing the locally displayed chart object.")
;; Internal Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define-obsolete-variable-alias 'generic-font-lock-defaults
+ 'generic-font-lock-keywords "22.1")
(defvar generic-font-lock-keywords nil
"Keywords for `font-lock-defaults' in a generic mode.")
(make-variable-buffer-local 'generic-font-lock-keywords)
-(define-obsolete-variable-alias 'generic-font-lock-defaults 'generic-font-lock-keywords "22.1")
;;;###autoload
(defvar generic-mode-list nil
;; anything else (turn off)
mode))))
+(define-obsolete-variable-alias 'emacs-lock-from-exiting
+ 'emacs-lock-mode "24.1")
;;;###autoload
(define-minor-mode emacs-lock-mode
"Toggle Emacs Lock mode in the current buffer.
;;; Compatibility
-(define-obsolete-variable-alias 'emacs-lock-from-exiting 'emacs-lock-mode "24.1")
-
(defun toggle-emacs-lock ()
"Toggle `emacs-lock-from-exiting' for the current buffer."
(interactive)
;;; Global Keymaps
;;;
+(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1")
(defvar tpu-gold-map
(let ((map (make-keymap)))
;; Previously we used escape sequences here. We now instead presume
map)
"Maps the function keys on the VT100 keyboard preceded by PF1.
GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
-(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1")
(defvar tpu-global-map
(let ((map (make-sparse-keymap)))
;;;It is not useful to make this a local variable.
;;;(put 'find-file-not-found-hooks 'permanent-local t)
+(define-obsolete-variable-alias 'find-file-not-found-hooks
+ 'find-file-not-found-functions "22.1")
(defvar find-file-not-found-functions nil
"List of functions to be called for `find-file' on nonexistent file.
These functions are called as soon as the error is detected.
Variable `buffer-file-name' is already set up.
The functions are called in the order given until one of them returns non-nil.")
-(define-obsolete-variable-alias 'find-file-not-found-hooks
- 'find-file-not-found-functions "22.1")
;;;It is not useful to make this a local variable.
;;;(put 'find-file-hooks 'permanent-local t)
:options '(auto-insert)
:version "22.1")
+(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
(defvar write-file-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
node `(elisp)Saving Buffers'.) To perform various checks or
updates before the buffer is saved, use `before-save-hook'.")
(put 'write-file-functions 'permanent-local t)
-(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
(defvar local-write-file-hooks nil)
(make-variable-buffer-local 'local-write-file-hooks)
(put 'local-write-file-hooks 'permanent-local t)
(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1")
+(define-obsolete-variable-alias 'write-contents-hooks
+ 'write-contents-functions "22.1")
(defvar write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
To perform various checks or updates before the buffer is saved,
use `before-save-hook'.")
(make-variable-buffer-local 'write-contents-functions)
-(define-obsolete-variable-alias 'write-contents-hooks
- 'write-contents-functions "22.1")
(defcustom enable-local-variables t
"Control use of local variables in files you visit.
(cancel-timer blink-cursor-timer)
(setq blink-cursor-timer nil)))
+(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
+
(define-minor-mode blink-cursor-mode
"Toggle cursor blinking (Blink Cursor mode).
With a prefix argument ARG, enable Blink Cursor mode if ARG is
blink-cursor-delay
'blink-cursor-start))))
-(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
-
\f
;;;; Key bindings
;; Misc.
;; Only marked as obsolete in 24.2.
-(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1")
+(define-obsolete-variable-alias 'automatic-hscrolling
+ 'auto-hscroll-mode "22.1")
(make-variable-buffer-local 'show-trailing-whitespace)
`-hook' or `-hooks', from which `unload-feature' should try to remove
pertinent symbols.")
+(define-obsolete-variable-alias 'unload-hook-features-list
+ 'unload-function-defs-list "22.2")
(defvar unload-function-defs-list nil
"List of definitions in the Lisp library being unloaded.
This is meant to be used by `FEATURE-unload-function'; see the
documentation of `unload-feature' for details.")
-(define-obsolete-variable-alias 'unload-hook-features-list
- 'unload-function-defs-list "22.2")
(defun unload--set-major-mode ()
(save-current-buffer
(eval-when-compile (require 'cl))
+;;;###autoload
+(define-obsolete-variable-alias 'disabled-command-hook
+ 'disabled-command-function "22.1")
;;;###autoload
(defvar disabled-command-function 'disabled-command-function
"Function to call to handle disabled commands.
If nil, the feature is disabled, i.e., all commands work normally.")
-;;;###autoload
-(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
-
;; It is ok here to assume that this-command is a symbol
;; because we won't get called otherwise.
;;;###autoload
st)
"Syntax table used in Metafont or MetaPost mode.")
+(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1")
(defvar meta-common-mode-map
(let ((map (make-sparse-keymap)))
;; Comment Paragraphs:
;; (define-key map "\C-c\C-l" 'meta-recenter-output)
map)
"Keymap used in Metafont or MetaPost mode.")
-(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1")
(easy-menu-define
meta-mode-menu meta-common-mode-map
(defvar speedbar-update-flag-disable nil
"Permanently disable changing of the update flag.")
+(define-obsolete-variable-alias
+ 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1")
(defvar speedbar-mode-syntax-table
(let ((st (make-syntax-table)))
;; Turn off paren matching around here.
(modify-syntax-entry ?\] " " st)
st)
"Syntax-table used on the speedbar.")
-(define-obsolete-variable-alias
- 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1")
+(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1")
(defvar speedbar-mode-map
(let ((map (make-keymap)))
(suppress-keymap map t)
(dframe-update-keymap map)
map)
"Keymap used in speedbar buffer.")
-(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1")
(defun speedbar-make-specialized-keymap ()
"Create a keymap for use with a speedbar major or minor display mode.
(and newtag (cdr cell) (not (member newtag (cdr cell)))
(push newtag (cdr cell)))))
+(define-obsolete-variable-alias
+ 'reftex-index-map 'reftex-index-mode-map "24.1")
(defvar reftex-index-mode-map
(let ((map (make-sparse-keymap)))
;; Index map
map)
"Keymap used for *Index* buffers.")
-(define-obsolete-variable-alias
- 'reftex-index-map 'reftex-index-mode-map "24.1")
(defvar reftex-index-menu)
"Font lock keywords for reftex-index-phrases-mode.")
(defvar reftex-index-phrases-font-lock-defaults nil
"Font lock defaults for reftex-index-phrases-mode.")
+(define-obsolete-variable-alias
+ 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1")
(defvar reftex-index-phrases-mode-map
(let ((map (make-sparse-keymap)))
;; Keybindings and Menu for phrases buffer
map)
"Keymap used for *toc* buffer.")
-(define-obsolete-variable-alias
- 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1")
(defun reftex-index-phrase-selection-or-word (arg)
(define-key map "-" 'negative-argument)
map))
+(define-obsolete-variable-alias
+ 'reftex-select-label-map 'reftex-select-label-mode-map "24.1")
(defvar reftex-select-label-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map reftex-select-shared-map)
"Keymap used for *RefTeX Select* buffer, when selecting a label.
This keymap can be used to configure the label selection process which is
started with the command \\[reftex-reference].")
-(define-obsolete-variable-alias
- 'reftex-select-label-map 'reftex-select-label-mode-map "24.1")
(define-derived-mode reftex-select-label-mode fundamental-mode "LSelect"
"Major mode for selecting a label in a LaTeX document.
;; We do not set a local map - reftex-select-item does this.
)
+(define-obsolete-variable-alias
+ 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1")
(defvar reftex-select-bib-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map reftex-select-shared-map)
"Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
This keymap can be used to configure the BibTeX selection process which is
started with the command \\[reftex-citation].")
-(define-obsolete-variable-alias
- 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1")
(define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect"
"Major mode for selecting a citation key in a LaTeX document.
(require 'reftex)
;;;
+(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1")
(defvar reftex-toc-mode-map
(let ((map (make-sparse-keymap)))
map)
"Keymap used for *toc* buffer.")
-(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1")
(defvar reftex-toc-menu)
(defvar reftex-last-window-height nil)
\f
;;; Variables that are not customizable.
+(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1")
+
(defvar tooltip-functions nil
"Functions to call to display tooltips.
Each function is called with one argument EVENT which is a copy
functions displays the tooltip, it should return non-nil and the
rest are not called.")
-(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1")
-
(defvar tooltip-timeout-id nil
"The id of the timeout started when Emacs becomes idle.")
(defconst log-edit-maximum-comment-ring-size 32
"Maximum number of saved comments in the comment ring.")
+(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1")
(defvar log-edit-comment-ring (make-ring log-edit-maximum-comment-ring-size))
+(define-obsolete-variable-alias 'vc-comment-ring-index
+ 'log-edit-comment-ring-index "22.1")
(defvar log-edit-comment-ring-index nil)
(defvar log-edit-last-comment-match "")
(insert "\n"))))
;; Compatibility with old names.
-(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1")
-(define-obsolete-variable-alias 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1")
(define-obsolete-function-alias 'vc-previous-comment 'log-edit-previous-comment "22.1")
(define-obsolete-function-alias 'vc-next-comment 'log-edit-next-comment "22.1")
(define-obsolete-function-alias 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1")