]> git.eshelyaron.com Git - emacs.git/commitdiff
(toggle-rot13-mode): New function.
authorRichard M. Stallman <rms@gnu.org>
Thu, 25 Aug 1994 23:23:09 +0000 (23:23 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 25 Aug 1994 23:23:09 +0000 (23:23 +0000)
lisp/rot13.el

index 3cad307cab56ed8fde4561ca0f4bf8810953cc7b..9c83132070777dbb2fde9047af46e15b623ef09f 100644 (file)
@@ -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