diff options
| author | Michael Albinus | 2018-05-14 17:06:33 +0200 |
|---|---|---|
| committer | Michael Albinus | 2018-05-14 17:06:33 +0200 |
| commit | b01e6dd7b202fd9fbed8f1afa6cb6065ed85ff66 (patch) | |
| tree | 8dc0a816cfbc31c13239ed63eb2c8512f874fc1b /lisp | |
| parent | 15fa8de1ae3228413fde95e583008d9b9f19e7c7 (diff) | |
| download | emacs-b01e6dd7b202fd9fbed8f1afa6cb6065ed85ff66.tar.gz emacs-b01e6dd7b202fd9fbed8f1afa6cb6065ed85ff66.zip | |
Remove obsolete objects from dired-x.el
* doc/misc/dired-x.texi (Local Variables): Remove node.
* lisp/dired-x.el (dired-enable-local-variables)
(default-directory-alist, dired-default-directory-alist)
(dired-default-directory, dired-local-variables-file)
(dired-hack-local-variables, dired-omit-here-always):
Remove obsolete variables, constants and functions.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/dired-x.el | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index a1c2f4484c5..4517dedeeb4 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -192,21 +192,6 @@ toggle between those two." | |||
| 192 | :type 'boolean | 192 | :type 'boolean |
| 193 | :group 'dired-x) | 193 | :group 'dired-x) |
| 194 | 194 | ||
| 195 | (defcustom dired-enable-local-variables t | ||
| 196 | "Control use of local-variables lists in Dired. | ||
| 197 | This temporarily overrides the value of `enable-local-variables' when | ||
| 198 | listing a directory. See also `dired-local-variables-file'." | ||
| 199 | :risky t | ||
| 200 | :type '(choice (const :tag "Query Unsafe" t) | ||
| 201 | (const :tag "Safe Only" :safe) | ||
| 202 | (const :tag "Do all" :all) | ||
| 203 | (const :tag "Ignore" nil) | ||
| 204 | (other :tag "Query" other)) | ||
| 205 | :group 'dired-x) | ||
| 206 | |||
| 207 | (make-obsolete-variable 'dired-enable-local-variables | ||
| 208 | "use a standard `dir-locals-file' instead." "24.1") | ||
| 209 | |||
| 210 | (defcustom dired-guess-shell-gnutar | 195 | (defcustom dired-guess-shell-gnutar |
| 211 | (catch 'found | 196 | (catch 'found |
| 212 | (dolist (exe '("tar" "gtar")) | 197 | (dolist (exe '("tar" "gtar")) |
| @@ -330,7 +315,6 @@ See also the functions: | |||
| 330 | `dired-do-find-marked-files'" | 315 | `dired-do-find-marked-files'" |
| 331 | (interactive) | 316 | (interactive) |
| 332 | ;; These must be done in each new dired buffer. | 317 | ;; These must be done in each new dired buffer. |
| 333 | (dired-hack-local-variables) | ||
| 334 | (dired-omit-startup)) | 318 | (dired-omit-startup)) |
| 335 | 319 | ||
| 336 | 320 | ||
| @@ -785,34 +769,6 @@ Also useful for `auto-mode-alist' like this: | |||
| 785 | ;; mechanism is provided for special handling of the working directory in | 769 | ;; mechanism is provided for special handling of the working directory in |
| 786 | ;; special major modes. | 770 | ;; special major modes. |
| 787 | 771 | ||
| 788 | (define-obsolete-variable-alias 'default-directory-alist | ||
| 789 | 'dired-default-directory-alist "24.1") | ||
| 790 | |||
| 791 | ;; It's easier to add to this alist than redefine function | ||
| 792 | ;; default-directory while keeping the old information. | ||
| 793 | (defconst dired-default-directory-alist | ||
| 794 | '((dired-mode . (if (fboundp 'dired-current-directory) | ||
| 795 | (dired-current-directory) | ||
| 796 | default-directory))) | ||
| 797 | "Alist of major modes and their opinion on `default-directory'. | ||
| 798 | Each element has the form (MAJOR . EXPRESSION). | ||
| 799 | The function `dired-default-directory' evaluates EXPRESSION to | ||
| 800 | determine a default directory.") | ||
| 801 | |||
| 802 | (put 'dired-default-directory-alist 'risky-local-variable t) ; gets eval'd | ||
| 803 | (make-obsolete-variable 'dired-default-directory-alist | ||
| 804 | "this feature is due to be removed." "24.1") | ||
| 805 | |||
| 806 | (defun dired-default-directory () | ||
| 807 | "Return the `dired-default-directory-alist' entry for the current major-mode. | ||
| 808 | If none, return `default-directory'." | ||
| 809 | ;; It looks like this was intended to be something of a "general" | ||
| 810 | ;; feature, but it only ever seems to have been used in | ||
| 811 | ;; dired-smart-shell-command, and doesn't seem worth keeping around. | ||
| 812 | (declare (obsolete nil "24.1")) | ||
| 813 | (or (eval (cdr (assq major-mode dired-default-directory-alist))) | ||
| 814 | default-directory)) | ||
| 815 | |||
| 816 | (defun dired-smart-shell-command (command &optional output-buffer error-buffer) | 772 | (defun dired-smart-shell-command (command &optional output-buffer error-buffer) |
| 817 | "Like function `shell-command', but in the current Virtual Dired directory." | 773 | "Like function `shell-command', but in the current Virtual Dired directory." |
| 818 | (interactive | 774 | (interactive |
| @@ -829,85 +785,6 @@ If none, return `default-directory'." | |||
| 829 | (shell-command command output-buffer error-buffer))) | 785 | (shell-command command output-buffer error-buffer))) |
| 830 | 786 | ||
| 831 | 787 | ||
| 832 | ;;; LOCAL VARIABLES FOR DIRED BUFFERS. | ||
| 833 | |||
| 834 | ;; Brief Description (This feature is obsolete as of Emacs 24.1) | ||
| 835 | ;; | ||
| 836 | ;; * `dired-extra-startup' is part of the `dired-mode-hook'. | ||
| 837 | ;; | ||
| 838 | ;; * `dired-extra-startup' calls `dired-hack-local-variables' | ||
| 839 | ;; | ||
| 840 | ;; * `dired-hack-local-variables' checks the value of | ||
| 841 | ;; `dired-local-variables-file' | ||
| 842 | ;; | ||
| 843 | ;; * Check if `dired-local-variables-file' is a non-nil string and is a | ||
| 844 | ;; filename found in the directory of the Dired Buffer being created. | ||
| 845 | ;; | ||
| 846 | ;; * If `dired-local-variables-file' satisfies the above, then temporarily | ||
| 847 | ;; include it in the Dired Buffer at the bottom. | ||
| 848 | ;; | ||
| 849 | ;; * Set `enable-local-variables' temporarily to the user variable | ||
| 850 | ;; `dired-enable-local-variables' and run `hack-local-variables' on the | ||
| 851 | ;; Dired Buffer. | ||
| 852 | |||
| 853 | (defcustom dired-local-variables-file (convert-standard-filename ".dired") | ||
| 854 | "Filename, as string, containing local Dired buffer variables to be hacked. | ||
| 855 | If this file found in current directory, then it will be inserted into dired | ||
| 856 | buffer and `hack-local-variables' will be run. See Info node | ||
| 857 | `(emacs)File Variables' for more information on local variables. | ||
| 858 | See also `dired-enable-local-variables'." | ||
| 859 | :type 'file | ||
| 860 | :group 'dired) | ||
| 861 | |||
| 862 | (make-obsolete-variable 'dired-local-variables-file 'dir-locals-file "24.1") | ||
| 863 | |||
| 864 | (defun dired-hack-local-variables () | ||
| 865 | "Evaluate local variables in `dired-local-variables-file' for Dired buffer." | ||
| 866 | (declare (obsolete hack-dir-local-variables-non-file-buffer "24.1")) | ||
| 867 | (and (stringp dired-local-variables-file) | ||
| 868 | (file-exists-p dired-local-variables-file) | ||
| 869 | (let ((opoint (point-max)) | ||
| 870 | (inhibit-read-only t) | ||
| 871 | ;; In case user has `enable-local-variables' set to nil we | ||
| 872 | ;; override it locally with dired's variable. | ||
| 873 | (enable-local-variables dired-enable-local-variables)) | ||
| 874 | ;; Insert 'em. | ||
| 875 | (save-excursion | ||
| 876 | (goto-char opoint) | ||
| 877 | (insert "\^L\n") | ||
| 878 | (insert-file-contents dired-local-variables-file)) | ||
| 879 | ;; Hack 'em. | ||
| 880 | (unwind-protect | ||
| 881 | (let ((buffer-file-name dired-local-variables-file)) | ||
| 882 | (hack-local-variables)) | ||
| 883 | ;; Delete this stuff: `eobp' is used to find last subdir by dired.el. | ||
| 884 | (delete-region opoint (point-max))) | ||
| 885 | ;; Make sure that the mode line shows the proper information. | ||
| 886 | (dired-sort-set-mode-line)))) | ||
| 887 | |||
| 888 | ;; Does not seem worth a dedicated command. | ||
| 889 | ;; See the more general features in files-x.el. | ||
| 890 | (defun dired-omit-here-always () | ||
| 891 | "Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'. | ||
| 892 | If in a Dired buffer, reverts it." | ||
| 893 | (declare (obsolete add-dir-local-variable "24.1")) | ||
| 894 | (interactive) | ||
| 895 | (if (file-exists-p dired-local-variables-file) | ||
| 896 | (error "Old-style dired-local-variables-file `./%s' found; | ||
| 897 | replace it with a dir-locals-file `./%s'" | ||
| 898 | dired-local-variables-file | ||
| 899 | dir-locals-file)) | ||
| 900 | (if (file-exists-p dir-locals-file) | ||
| 901 | (message "File `./%s' already exists." dir-locals-file) | ||
| 902 | (add-dir-local-variable 'dired-mode 'subdirs nil) | ||
| 903 | (add-dir-local-variable 'dired-mode 'dired-omit-mode t) | ||
| 904 | ;; Run extra-hooks and revert directory. | ||
| 905 | (when (derived-mode-p 'dired-mode) | ||
| 906 | (hack-dir-local-variables-non-file-buffer) | ||
| 907 | (dired-extra-startup) | ||
| 908 | (dired-revert)))) | ||
| 909 | |||
| 910 | |||
| 911 | ;;; GUESS SHELL COMMAND. | 788 | ;;; GUESS SHELL COMMAND. |
| 912 | 789 | ||
| 913 | ;; Brief Description: | 790 | ;; Brief Description: |