summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/rot13.el9
1 files changed, 9 insertions, 0 deletions
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