From dcd12c89db5fd376f80a878759c1a6dff18dfcb3 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 Aug 1994 23:23:09 +0000 Subject: (toggle-rot13-mode): New function. --- lisp/rot13.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp/rot13.el') diff --git a/lisp/rot13.el b/lisp/rot13.el index 3cad307cab5..9c831320707 100644 --- a/lisp/rot13.el +++ b/lisp/rot13.el @@ -52,6 +52,15 @@ To terminate the rot13 display, delete that window." (let ((w (display-buffer (current-buffer) t))) (set-window-display-table w rot13-display-table))) +;;;###autoload +(defun toggle-rot13-mode () + "Toggle the use of rot 13 encoding for the current window." + (interactive) + (if (eq (window-display-table (selected-window)) rot13-display-table) + (set-window-display-table (selected-window) nil) + (if (null (window-display-table (selected-window))) + (set-window-display-table (selected-window) rot13-display-table)))) + (provide 'rot13) ;;; rot13.el ends here -- cgit v1.2.1