From 261b97c1efa93b05bc8ad49df94df1ae7552cfe2 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Tue, 14 Dec 2010 01:34:35 +0000 Subject: [PATCH] dgnushack.el (rot13-string): New macro for XEmacs. netrc.el uses it. --- lisp/ChangeLog | 4 ++++ lisp/dgnushack.el | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05d6e38ab..3d5795941 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-12-14 Katsumi Yamaoka + + * dgnushack.el (rot13-string): New macro for XEmacs. netrc.el uses it. + 2010-12-13 Andrew Cohen * nnir.el (nnir-run-gmane): Better check for gmane groups: error out if diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 7274cb0bf..3e38fccf7 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -194,6 +194,17 @@ (autoload 'read-passwd "passwd") (autoload 'regexp-opt "regexp-opt") (autoload 'reporter-submit-bug-report "reporter") + (if (condition-case nil + (progn + (require 'rot13) + (not (fboundp 'rot13-string))) + (error nil)) + (defmacro rot13-string (string) + "Return ROT13 encryption of STRING." + `(with-temp-buffer + (insert ,string) + (translate-region (point-min) (point-max) ,rot13-display-table) + (buffer-string)))) (if (and (emacs-version>= 21 5) (not (featurep 'sxemacs))) (autoload 'setenv "process" nil t) -- 2.34.1