" line suitable for WWW
(interactive)
(insert "Last changed on ")
(let ((p (point)))
(insert ". Comments&corrections to mfx@cs.tu-berlin.de.")
(goto-char p)
(insert-std-date)
(end-of-line)))
(global-set-key [f5] 'insert-last-edit)
(defun htmlify-region () ; change & < > to html counterparts
(interactive)
(narrow-to-region (region-beginning)(region-end))
(goto-char (region-beginning))
(while (search-forward "&" nil t) (replace-match "&" nil t))
(goto-char (region-beginning))
(while (search-forward "<" nil t) (replace-match "<" nil t))
(goto-char (region-beginning))
(while (search-forward ">" nil t) (replace-match ">" nil t))
(goto-char (region-beginning))
(while (search-forward "ä" nil t) (replace-match "ä" nil t))
(goto-char (region-beginning))
(while (search-forward "ö" nil t) (replace-match "ö" nil t))
(goto-char (region-beginning))
(while (search-forward "ü" nil t) (replace-match "ü" nil t))
(goto-char (region-beginning))
(while (search-forward "Ä" nil t) (replace-match "Ä" nil t))
(goto-char (region-beginning))
(while (search-forward "Ö" nil t) (replace-match "Ö" nil t))
(goto-char (region-beginning))
(while (search-forward "Ü" nil t) (replace-match "Ü" nil t))
(goto-char (region-beginning))
(while (search-forward "ß" nil t) (replace-match "ß" nil t))
(widen))
(global-set-key [f6] 'htmlify-region)
(global-set-key [f7] "********** CURRENTLY BEING EDITED **********
\n")
(global-set-key [f8] "This page is part of the Trash Heap.")
(defun comment-region () ; change < > to [ ]
(interactive)
(narrow-to-region (region-beginning)(region-end))
(goto-char (region-beginning))
(while (search-forward "<" nil t) (replace-match "[" nil t))
(goto-char (region-beginning))
(while (search-forward ">" nil t) (replace-match "]" nil t))
(widen))
(global-set-key [f9] 'comment-region)
(defun uncomment-region () ; change [ ] to < >
(interactive)
(narrow-to-region (region-beginning)(region-end))
(goto-char (region-beginning))
(while (search-forward "[" nil t) (replace-match "<" nil t))
(goto-char (region-beginning))
(while (search-forward "]" nil t) (replace-match ">" nil t))
(widen))
(global-set-key [f10] 'uncomment-region)
(defun entag-word (tag) ; fooo -> fooo
(backward-word 1)
(insert "<")
(insert tag)
(insert ">")
(forward-word 1)
(insert "")
(insert tag)
(insert ">")
)
(defun mark-as-code () ; fooo -> fooo
(interactive)
(entag-word "code"))
(global-set-key [(f11)] 'mark-as-code) ; emacs 19
; (global-set-key [(control f1)] 'mark-as-code) ; xemacs 19
(defun repair-name ()
(interactive)
(beginning-of-buffer)
(while (search-forward "mfx@cs.tu.berlin.de" nil t)
(replace-match "mfx@cs.tu-berlin.de" nil t))
(save-buffer)
(kill-buffer (current-buffer)))