changeset 8626:fe49c4bb99d4

(toggle-rot13-mode): New function.
author Richard M. Stallman <rms@gnu.org>
date Thu, 25 Aug 1994 23:23:09 +0000
parents 00437255eed7
children 0f1ea6fb9dda
files lisp/rot13.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/rot13.el	Thu Aug 25 22:55:25 1994 +0000
+++ b/lisp/rot13.el	Thu Aug 25 23:23:09 1994 +0000
@@ -52,6 +52,15 @@
   (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