Where did the waste toggle switch disappear in Emacs 23.2?

The problem of updating from Emacs 21.2 to 23.2 continues ... In my .emacs, it is very convenient for me:

(global-set-key (quote [f4]) (quote dired-omit-toggle))

It worked with Emacs 18 ... but it no longer works in Emacs 23.2:

Lisp error: (void-function Dired-Omit switch)

Any idea how I can replace this functionality in Emacs 23.2?

EmacsWiki says:

To use this mode, add the following: your InitFile.

  (add-hook 'dired-load-hook
            (function (lambda () (load "dired-x"))))

and that’s exactly what I have had all these years. But Emacs 23.2 no longer likes it. Any idea what could replace it in Emacs 23.2?

+3
source share
2 answers

Emacs 22 dired-omit-mode dired-omit-toggle. dired-x. NEWS.22:

*** Dired-x dired-omit-mode.

M-o. dired-mark-omitted, * O, . dired-omit-files-p , .

+3

Emacs 21 23 , .emac , Emacs 21, Emacs 23, :

(GNUEmacs21
 (global-set-key (quote [f4]) (quote dired-omit-toggle))
)

(GNUEmacs22
 (global-set-key (quote [f4]) (quote dired-omit-mode))
)

(GNUEmacs23
 (global-set-key (quote [f4]) (quote dired-omit-mode))
)

GNUEmacs21, GNUEmacs22 GNUEmacs23 .emacs :

(defmacro GNUEmacs23 (&rest body)
  (list 'if (string-match "GNU Emacs 23" (version))
        (cons 'progn body)))

(defmacro GNUEmacs22 (&rest body)
  (list 'if (string-match "GNU Emacs 22" (version))
        (cons 'progn body)))

(defmacro GNUEmacs21 (&rest body)
  (list 'if (string-match "GNU Emacs 21" (version))
        (cons 'progn body)))
0

Source: https://habr.com/ru/post/1760424/


All Articles