From: Nils Gillmann Date: Thu, 17 May 2018 17:44:34 +0000 (+0000) Subject: Move hacks.el to contrib X-Git-Tag: v0.11.0pre66~36^2~70 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=03ce7bc90340793f32526dd3b6ee3d4a6ab79be5;p=oweals%2Fgnunet.git Move hacks.el to contrib Signed-off-by: Nils Gillmann --- diff --git a/contrib/hacks.el b/contrib/hacks.el new file mode 100644 index 000000000..bfb5c98fa --- /dev/null +++ b/contrib/hacks.el @@ -0,0 +1,18 @@ +;;;; hacks.el --- a few functions to help me work on the manual +;;;; Jim Blandy --- October 1998 +;;;; -- imported from https://git.savannah.gnu.org/cgit/guile.git/tree/doc/hacks.el +;;;; This code should be covered by the same license as GNU Guile (GPL3). + +(defun jh-exemplify-region (start end) + (interactive "r") + (save-excursion + (save-restriction + (narrow-to-region start end) + + ;; Texinfo doesn't handle tabs well. + (untabify (point-min) (point-max)) + + ;; Quote any characters special to texinfo. + (goto-char (point-min)) + (while (re-search-forward "[{}@]" nil t) + (replace-match "@\\&"))))) diff --git a/doc/hacks.el b/doc/hacks.el deleted file mode 100644 index bfb5c98fa..000000000 --- a/doc/hacks.el +++ /dev/null @@ -1,18 +0,0 @@ -;;;; hacks.el --- a few functions to help me work on the manual -;;;; Jim Blandy --- October 1998 -;;;; -- imported from https://git.savannah.gnu.org/cgit/guile.git/tree/doc/hacks.el -;;;; This code should be covered by the same license as GNU Guile (GPL3). - -(defun jh-exemplify-region (start end) - (interactive "r") - (save-excursion - (save-restriction - (narrow-to-region start end) - - ;; Texinfo doesn't handle tabs well. - (untabify (point-min) (point-max)) - - ;; Quote any characters special to texinfo. - (goto-char (point-min)) - (while (re-search-forward "[{}@]" nil t) - (replace-match "@\\&")))))