From: Glenn Morris Date: Wed, 20 Dec 2017 21:05:46 +0000 (-0500) Subject: Fix some more aliases to user options X-Git-Tag: emacs-26.0.91~107 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7af7f5e;p=emacs.git Fix some more aliases to user options * lisp/cus-edit.el (custom-mode-hook): * lisp/erc/erc.el (erc-default-coding-system): * lisp/progmodes/python.el (python-indent, python-guess-indent) (python-shell-virtualenv-path) (python-shell-completion-module-string-code) (python-shell-completion-pdb-string-code, python-use-skeletons): Define aliases to user options before the options are defined. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index efdadffa077..9993f9494fa 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4776,6 +4776,8 @@ If several parents are listed, go to the first of them." (parent (downcase (widget-get button :tag)))) (customize-group parent))))) +(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") + (defcustom Custom-mode-hook nil "Hook called when entering Custom mode." :type 'hook @@ -4804,7 +4806,6 @@ If several parents are listed, go to the first of them." (setq-local 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. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index d75209a0e28..c6548b7eaf9 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -122,8 +122,6 @@ "Running scripts at startup and with /LOAD" :group 'erc) -(require 'erc-backend) - ;; compatibility with older ERC releases (define-obsolete-variable-alias 'erc-announced-server-name @@ -135,6 +133,8 @@ (define-obsolete-function-alias 'erc-send-command 'erc-server-send "ERC 5.1") +(require 'erc-backend) + ;; tunable connection and authentication parameters (defcustom erc-server nil diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 035d93f7b99..4388cbdc060 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -725,12 +725,18 @@ It makes underscores and dots word constituent chars.") ;;; Indentation +(define-obsolete-variable-alias + 'python-indent 'python-indent-offset "24.3") + (defcustom python-indent-offset 4 "Default indentation offset for Python." :group 'python :type 'integer :safe 'integerp) +(define-obsolete-variable-alias + 'python-guess-indent 'python-indent-guess-indent-offset "24.3") + (defcustom python-indent-guess-indent-offset t "Non-nil tells Python mode to guess `python-indent-offset' value." :type 'boolean @@ -750,12 +756,6 @@ It makes underscores and dots word constituent chars.") :type '(repeat symbol) :group 'python) -(define-obsolete-variable-alias - 'python-indent 'python-indent-offset "24.3") - -(define-obsolete-variable-alias - 'python-guess-indent 'python-indent-guess-indent-offset "24.3") - (defvar python-indent-current-level 0 "Deprecated var available for compatibility.") @@ -2042,6 +2042,9 @@ executed through tramp connections." :type '(repeat string) :group 'python) +(define-obsolete-variable-alias + 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") + (defcustom python-shell-virtualenv-root nil "Path to virtualenv root. This variable, when set to a string, makes the environment to be @@ -2050,9 +2053,6 @@ virtualenv." :type '(choice (const nil) string) :group 'python) -(define-obsolete-variable-alias - 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") - (defcustom python-shell-setup-codes nil "List of code run by `python-shell-send-setup-codes'." :type '(repeat symbol) @@ -3289,14 +3289,6 @@ def __PYTHON_EL_get_completions(text): :type 'string :group 'python) -(defcustom python-shell-completion-string-code - "';'.join(__PYTHON_EL_get_completions('''%s'''))" - "Python code used to get a string of completions separated by semicolons. -The string passed to the function is the current python name or -the full statement in the case of imports." - :type 'string - :group 'python) - (define-obsolete-variable-alias 'python-shell-completion-module-string-code 'python-shell-completion-string-code @@ -3309,6 +3301,14 @@ the full statement in the case of imports." "25.1" "Completion string code must work for (i)pdb.") +(defcustom python-shell-completion-string-code + "';'.join(__PYTHON_EL_get_completions('''%s'''))" + "Python code used to get a string of completions separated by semicolons. +The string passed to the function is the current python name or +the full statement in the case of imports." + :type 'string + :group 'python) + (defcustom python-shell-completion-native-disabled-interpreters ;; PyPy's readline cannot handle some escape sequences yet. Native ;; completion was found to be non-functional for IPython (see @@ -4040,6 +4040,9 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." ;;; Skeletons +(define-obsolete-variable-alias + 'python-use-skeletons 'python-skeleton-autoinsert "24.3") + (defcustom python-skeleton-autoinsert nil "Non-nil means template skeletons will be automagically inserted. This happens when pressing \"if\", for example, to prompt for @@ -4048,9 +4051,6 @@ the if condition." :group 'python :safe 'booleanp) -(define-obsolete-variable-alias - 'python-use-skeletons 'python-skeleton-autoinsert "24.3") - (defvar python-skeleton-available '() "Internal list of available skeletons.")