chiark / gitweb /
Merge old CVS `ian-dotfiles' repo, as a subtree where we can pick bits
[ian-dotfiles.git] / home / emacs / ian.el
1 ; This is my real emacs start-up file (for chiark).
2
3
4 (defalias 'perl-mode 'cperl-mode)
5 (setq cperl-invalid-face nil
6       cperl-indent-level 4
7       cperl-continued-statement-offset 4)
8
9 (make-variable-buffer-local 'indent-line-function)
10 ; Un-disable narrow and eval-expression
11 (put 'narrow-to-region 'disabled nil)
12 (put 'eval-expression 'disabled nil)
13 (standard-display-european t)
14 ;
15 (setq browse-url-netscape-program "mozilla")
16 (setq common-lisp-hyperspec-root "/usr/share/doc/hyperspec/")
17 ;
18 ; Make sure we don't disturb links or change ownership, use numbers
19 (setq backup-by-copying-when-mismatch t)
20 (setq backup-by-copying-when-linked t)
21 ;(setq version-control t
22 ;      kept-new-versions 4
23 ;      kept-old-versions 4
24 ;      trim-versions-without-asking t)
25 ;
26 ; Various one-liners
27 (setq require-final-newline "ask")
28 (if (string= window-system 'x) (load-library "ian-x"))
29 (load-library "ian-aliases")
30 ; (load-library "auto-pgp")
31 ; (load-library "debian-changelog-mode")
32 ; (if (string= (getenv "TERM") "bbcb32") (setq term-file-prefix nil))
33 ; (setq explicit-shell-file-name "/usr/local/bin/tcsh")
34 (setq inhibit-local-variables t)
35 (setq enable-local-variables 'ask-me)
36 (setq enable-recursive-minibuffers t)
37 (setq compile-command "make")
38 (setq next-line-add-newlines t)
39 (setq diff-switches "-u")
40 (setq line-move-visual nil)
41 (display-time)
42 ;
43 (set-variable 'search-repeat-char 28)
44 (set-fringe-mode (cons 0 nil))
45 (if (string-match "^19\." emacs-version)
46     (progn
47 ;      (setq file-name-handler-alist     ; Disable nasty auto-loading of ange-ftp
48 ;            (delq (rassq 'ange-ftp-completion-hook-function file-name-handler-alist)
49 ;                  file-name-handler-alist))
50       (require 'find-alternate-18style)
51       (defun unset-down-mouse-23 ()
52         (local-set-key [mouse-2] 'mouse-yank-at-click)
53         (local-unset-key [down-mouse-2])
54         (local-unset-key [down-mouse-3])
55         (local-unset-key [C-down-mouse-3]))
56       (add-hook 'vm-mode-hook 'unset-down-mouse-23)
57       (add-hook 'vm-mail-mode-hook 'unset-down-mouse-23)
58       (add-hook 'text-mode-hook 'unset-down-mouse-23)
59       (add-hook 'Info-mode-hook
60                 (function (lambda ()
61                             (local-set-key " " 'scroll-up)
62                             (local-set-key "\7f" 'scroll-down))))
63       (define-key isearch-mode-map "\1c" 'isearch-repeat-forward)
64       (define-key isearch-mode-map "\1d" 'isearch-quote-char)))
65 ;
66 (menu-bar-mode -1)
67 (defun terminal-keybindings ()
68   "This function should be called by the term-setup-hook mechanism"
69   (interactive)
70   ; Set my own keybindings
71   ;
72   ; Set keybindings generally (including I-search on C-\)
73 ;  (global-set-key "    " 'self-insert-command)
74   (global-set-key "\1c" 'isearch-forward)
75 ;  (global-set-key "\r" 'newline)
76   (global-set-key "\ f" 'set-mark-command)
77   (global-set-key "\1d" 'quoted-insert)
78   ;
79   ; Set keybindings on esc-map
80   (global-set-key "\e#" 'query-replace-regexp)
81   (global-set-key "\e+" 'toggle-truncate-lines)
82   (global-set-key "\eg" 'goto-line)
83   (global-set-key "\es" 'isearch-forward-regexp)
84   (global-set-key "\e\e" 'eval-expression)
85   ;
86   ; Set keybindings on ^X-map.
87   (global-set-key "\18m" 'vm-mail)
88   (global-set-key "\18\1c" 'save-buffer)
89   (global-set-key "\18\1d" 'toggle-read-only)
90   (global-set-key "\18#" 'recover-file)
91   (global-set-key "\18\12" 'bury-buffer)
92   (global-set-key "\18\v" 'quicker-compile)
93   (global-set-key "\18\18" 'exchange-point-and-mark)
94   (global-set-key "\18\1a" 'load-tramp)
95   (global-set-key "\184\16" 'scroll-other-window)
96   (global-set-key "\184m" 'vm-mail-other-window)
97   (global-set-key "\189" 'vm-visit-folder)
98   (global-set-key "\188" 'rmail-input)
99   (global-set-key "\18p" 'cite-region)
100   (global-set-key "\18F" 'mail-formletter)
101   ;
102   ; Set keybindings for Sun numeric pad.
103   (setq esc-bracket-map (make-keymap))
104   (define-key esc-bracket-map "D" 'backward-char)
105   (define-key esc-bracket-map "C" 'forward-char)
106   (define-key esc-bracket-map "A" 'previous-line)
107   (define-key esc-bracket-map "B" 'next-line)
108   (define-key esc-map "[" esc-bracket-map)
109   (global-set-key "\e[214z" 'beginning-of-buffer)
110   (global-set-key "\e[220z" 'end-of-buffer)
111   (global-set-key "\e[216z" 'scroll-down)
112   (global-set-key "\e[222z" 'scroll-up)
113   (global-set-key "\e[192z" 'save-buffer)
114   (global-set-key "\e[194z" 'save-some-buffers)
115   (global-set-key "\e[195z" 'undo)
116   (global-set-key "\e[193z" 'call-last-kbd-macro)
117   (global-set-key "\e[196z" 'switch-to-buffer-other-window)
118   (global-set-key "\e[197z" 'copy-region-as-kill)
119   (global-set-key "\e[198z" 'find-file)
120   (global-set-key "\e[199z" 'yank)
121   (global-set-key "\e[198z" 'find-alternate-file)
122   (global-set-key "\e[200z" 'find-file)
123   (global-set-key "\e[201z" 'kill-region)
124   (global-set-key "\e[-1z" 'info)
125   ;
126   ; Set keybindings for Chiarks' x11emacs
127   (global-set-key "\e[5~" 'scroll-down)
128   (global-set-key "\e[6~" 'scroll-up)
129   ;
130   ; Set keybindings for knackered vt100-like terminal emulators.
131   (global-set-key "\eOt" 'scroll-down)
132   (global-set-key "\eOu" 'scroll-up)
133   (global-set-key "\eOD" 'backward-char)
134   (global-set-key "\eOC" 'forward-char)
135   (global-set-key "\eOA" 'previous-line)
136   (global-set-key "\eOB" 'next-line))
137 (setq term-setup-hook 'terminal-keybindings)     ; remap keys in due course
138 ;
139 ; Autoload definitions
140 (autoload 'tar-mode "tar-mode")
141 (autoload 'uncompress-while-visiting "uncompress")
142 ; (autoload 'c++-mode "c++-mode" "Mode for editing C and C++ programs" t)
143 (autoload 'hide-ifdef-mode "hideif" "For editing code with #ifdefs" t)
144 ;(setq-default indent-tabs-mode nil)
145 (autoload 'dired-find-alternate-file "dired-alternate" "Find alternately" t)
146 (autoload 'dired-run-file "dired-alternate" "Run this file" t)
147 (autoload 'perl-mode "perl-mode" "Mode for Perl code" t)
148 ; (autoload 'rmail "rmail-fixed" "Patched mail reader" t)
149 (autoload 'quicker-compile "quicker-compile" "Patched Compile mode" t)
150
151 (autoload 'vm "vm" "Start VM on your primary inbox." t)
152 (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
153 (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
154 (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
155 (autoload 'vm-mail "vm" "Send a mail message using VM." t)
156 (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)
157 ;
158 ; (autoload 'info "info-fixed" "Patched info browser" t)
159 (setq shell-mode-hook
160       '(lambda ()
161          (make-variable-buffer-local 'scroll-step)
162          (setq scroll-step 1)))
163 (setq inferior-lisp-program "sbcl")
164 ;(setq jit-lock-chunk-size 100
165 ;      jit-lock-stealth-time 1.00)
166 (setq dired-mode-hook
167       '(lambda ()
168          (define-key dired-mode-map "F" 'dired-find-alternate-file)
169          (define-key dired-mode-map "X" 'dired-run-file)))
170 ;
171 ; Prevent loading of default init file and do some of the things it did
172 ; (setq inhibit-default-init t)
173 ;
174 ; Additional alist handling function
175 ;(defun alist-remove-elem (s s-list)
176 ;  "Delete the element of the alist S-LIST whose car is S"
177 ;  (if s-list (if (equal s (car (car s-list)))
178 ;                (cdr s-list)
179 ;              (cons (car s-list) (alist-remove-elem s (cdr s-list))))
180 ;    (nil)))
181 ;
182 ; Load C++ mode and edit Perl in perl mode
183 (setq auto-mode-alist
184       (append '(("\\.[ch]$" . c-mode)
185                 ("\\.[CH]$" . c++-mode)
186                 ("\\.cc$" . c++-mode)
187                 ("\\.hh$" . c++-mode)
188 ;                ("\\.tar$" . tar-mode)
189                 ("\\.pl$" . perl-mode)
190                 ("\\.ci$" . tex-mode)
191                 ("\\.asm$" . fundamental-mode)
192                 ("\\.Z$" . uncompress-while-visiting))
193               auto-mode-alist))
194 (setq interpreter-mode-alist
195       (append '(("sh" . fundamental-mode)
196                 ("bash" . fundamental-mode))
197               interpreter-mode-alist))
198 ;
199 ; Use auto-fill when editing text
200 (add-hook 'text-mode-hook '(lambda () (auto-fill-mode 1)))
201 ; (add-hook 'text-mode-hook '(lambda () (local-set-key "        " 'self-insert-command)))
202 ;
203 ; Set up newline to auto-indent & other stuff for perl, c++ and c modes.
204 (setq perl-mode-hook '(lambda () 
205                         (local-set-key ";" 'self-insert-command)))
206 (setq c++-mode-hook '(lambda ()
207                        (hide-ifdef-mode 1)
208                        (local-set-key "," 'self-insert-command)
209                        (local-set-key ":" 'electric-c++-terminator)))
210 ; c++-electric-colon
211 (setq c-mode-hook '(lambda ()
212                      (hide-ifdef-mode 1)
213                      (c-set-offset 'substatement-open 0 nil)
214                      (local-set-key "," 'self-insert-command)
215                      (local-set-key ";" 'self-insert-command)
216                      (local-set-key "/" 'self-insert-command)
217                      (local-set-key "*" 'self-insert-command)
218                      (local-set-key "#" 'self-insert-command)
219                      (local-set-key "(" 'self-insert-command)
220                      (local-set-key ")" 'self-insert-command)
221                      (local-set-key "{" 'self-insert-command)
222                      (local-set-key "\r" 'newline-and-indent)))
223 (setq c-hanging-comment-ender-p nil)
224 ;
225 (defun vm-mail-other-window ()
226   "Like `vm-mail' command, but display buffer in another window."
227   (interactive)
228   (switch-to-buffer-other-window (current-buffer))
229   (vm-mail))
230 ;
231 ; mail precedences
232 (setq mail-precedence-key-alist
233       '((?0  . "special-delivery")
234         (?1  . "air-mail")
235         (?2  . "first-class")
236         (?3  . "second-class")
237         (?5  . "third-class")
238         (?\  . nil)
239         (?6  . "bulk")
240         (?9  . "junk")))
241 ;
242 (defun mail-precedence-as-key ()
243   "Set precedence by looking up last command char in mail-precedence-key-alist"
244   (interactive)
245   (message "%s" (concat "Precedence ["
246                         (mapconcat '(lambda (c) (char-to-string (car c)))
247                                    mail-precedence-key-alist "")
248                         "] ?"))
249   (let* ((key (read-char))
250          (prec (assoc key mail-precedence-key-alist)))
251     (if prec (mail-precedence (cdr prec))
252       (error "mail-precedence-as-key `%s' not found" key))))
253 ;
254 (defun mail-precedence-as-key-send-and-exit (arg)
255   "Set precedence by looking up last command char in mail-precedence-key-alist,
256 then call send-and-exit."
257   (interactive "P")
258   (mail-precedence-as-key)
259   (execute-kbd-macro "\ 3\ 3"))
260 ;
261 (defun mail-precedence (prec)
262   (save-excursion
263     (mail-position-on-field "Precedence")
264     (let ((p (point)))
265       (beginning-of-line)
266       (delete-region (point) p)
267       (if prec
268           (insert "Precedence: " prec)
269         (delete-char 1)))))
270 ;
271 (defun mail-mode-setup-keys ()
272   (local-set-key "\ 3\10" 'mail-precedence-as-key)
273   (local-set-key "\ 3p" 'mail-precedence-as-key-send-and-exit))
274 (add-hook 'mail-mode-hook 'mail-mode-setup-keys)
275 (add-hook 'vm-mail-mode-hook 'mail-mode-setup-keys)
276 ;
277 (defun vm-mail-other-window ()
278   "Like `vm-mail' command, but display buffer in another window."
279   (interactive)
280   (switch-to-buffer-other-window (current-buffer))
281   (vm-mail))
282 ;
283 (defun mail-formletter ()
284   "Run VM-mail with ,Formletter"
285   (interactive)
286   (vm-mail)
287   (rename-buffer (generate-new-buffer-name "form letter") t)
288   (delete-region (point-min) (point-max))
289   (insert-file (concat vm-folder-directory ",Formletter")))
290 ;
291 ; This function bound to C-x C-z
292 (defun load-tramp ()
293   "Load tramp using require, if it isn't loaded already"
294   (interactive)
295   (message "Loading tramp...")
296   (require 'tramp) ; -extended
297   (message "Loading tramp...done"))
298 ;
299 ; This function bound to M-+
300 (defun toggle-truncate-lines ()
301   "Toggle truncation or folding of long lines"
302   (interactive)
303   (set-variable 'truncate-lines (not truncate-lines))
304   (redraw-display))
305 ;
306 ; RMAIL stuff
307 ;(setq rmail-file-name "~/mail/RMAIL"
308 ;      mail-archive-file-name "~/mail/Outbound"
309 ;      rmail-primary-inbox-list '("~/mbox" "~/mail/Outbound" "~/mail/Record"
310 ;                                 "~/mail/Import" "/var/spool/mail/ian")
311 ;      rmail-delete-after-output t
312 ;      rmail-last-rmail-file ""
313 ;      rmail-ignored-headers (concat
314 ;                             "^Content-Identifier:\\|^X400-[^O][A-Za-z-]+:\\|"
315 ;                             rmail-ignored-headers))
316 ;
317 (defun make-regexps-ignore-non-address (list)
318   (apply 'append (mapcar
319                   '(lambda (item)
320                      (let ((item (mapconcat
321                                   '(lambda (ch)
322                                      (let ((s (char-to-string ch)))
323                                        (if (string-match "[][.*+?^$\\]" s)
324                                            (concat "\\" s)
325                                          s)))
326                                   item "")))
327                        (list
328                         (concat "<" item ">")
329                         (concat "^" item " *\\((.*)\\)?$"))))
330                   list)))
331 ;
332 ; BBDB
333 (setq bbdb-north-american-phone-numbers-p nil
334       bbdb/mail-auto-create-p t
335       bbdb-auto-revert-p t
336       bbdb-notice-auto-save-file-p t
337       bbdb-message-caching-enabled t)      
338 ;
339 ; VM stuff
340 ;(load-file "~/private/private.el")
341 (if (file-exists-p "~/private/private2.el")
342   (load-file "~/private/private2.el"))
343 (setq vm-included-text-attribution-format "%F writes (\"%s\"):\n"
344       vm-reply-subject-prefix "Re: "
345       vm-folder-directory "~/mail/"
346       vm-delete-after-saving t
347       vm-delete-empty-folders t
348       vm-mutable-windows t
349       vm-auto-get-new-mail nil
350       vm-auto-next-message nil
351       vm-jump-to-new-messages nil
352       vm-jump-to-unread-messages nil
353       vm-mime-digest-discard-header-regexp "only-drop-this-header"
354       vm-preview-lines nil
355       vm-included-text-prefix "> "
356       vm-confirm-quit 1
357       vm-auto-center-summary t
358       vm-confirm-new-folders t
359       vm-circular-folders nil
360       vm-visit-when-saving 0
361       vm-move-after-deleting t
362       vm-keep-sent-messages t
363       vm-follow-summary-cursor t
364       vm-frame-per-composition nil
365       vm-frame-per-edit nil
366       vm-frame-per-summary nil
367       vm-frame-per-folder nil
368       vm-tale-is-an-idiot t
369       vm-primary-inbox (concat vm-folder-directory "INBOX")
370       vm-sinbin-inbox (concat vm-folder-directory "SINBOX")
371       vm-uninteresting-senders "ian"
372       vm-reply-ignored-addresses
373       (make-regexps-ignore-non-address
374        '("ian@chiark.chu.cam.ac.uk" "ian" "iwj10@cus.cam.ac.uk"
375          "ian@chiark.greenend.org.uk"
376          "ijackson@nyx.cs.du.edu" "ijackson@gnu.ai.mit.edu"))
377       vm-primary-inbox (concat vm-folder-directory "INBOX")
378
379       vm-uninteresting-senders "ian"
380       vm-reply-ignored-addresses
381       (make-regexps-ignore-non-address
382        '("ijackson@chiark.chu.cam.ac.uk" "ijackson"
383          "iwj10@thor.cam.ac.uk" "iwj10@hermes.cam.ac.uk" "iwj10@cl.cam.ac.uk"
384          "iwj10@cam.ac.uk" "Ian.Jackson@cl.cam.ac.uk"))
385       mail-archive-file-name "~/mail/Outbound"
386
387
388       vm-spool-files
389       '((vm-primary-inbox "/var/spool/mail/ian"
390                           "~/mail/INBOX.CRASH")
391         (vm-primary-inbox "~/News/r" "~/mail/INBOX.CRASH")
392         (vm-primary-inbox "~/mbox" "~/mail/INBOX.CRASH")
393         (vm-primary-inbox "~/mail/Outbound" "~/mail/INBOX.CRASH")
394         (vm-primary-inbox "~/mail/Import" "~/mail/INBOX.CRASH")
395         (vm-primary-inbox "~/mail/Record" "~/mail/INBOX.CRASH")
396         (vm-sinbin-inbox "/var/spool/mail/ian" "~/mail/SINBOX.CRASH"))
397       vm-startup-with-summary t
398
399       user-mail-address "ijackson@chiark.greenend.org.uk"
400
401
402 ;      vm-spool-files
403 ;      (list
404 ;       (list vm-primary-inbox "~/mbox" "~/mail/INBOX.CRASH")
405 ;       (list vm-primary-inbox "~/mail/Outbound" "~/mail/INBOX.CRASH")
406 ;       (list vm-primary-inbox "~/mail/Record" "~/mail/INBOX.CRASH")
407 ;       (list vm-primary-inbox "~/mail/Import" "~/mail/INBOX.CRASH")
408 ;       (list vm-primary-inbox "/var/spool/mail/ian" "~/mail/INBOX.CRASH")
409 ;       (list vm-primary-inbox "~/News/r" "~/mail/INBOX.CRASH")
410 ;       (list vm-sysadmin-inbox "~/mbox" "~/mail/SINBOX.CRASH")
411 ;       (list vm-sysadmin-inbox "~/mail/SOutbound" "~/mail/SINBOX.CRASH")
412 ;       (list vm-sysadmin-inbox "~/mail/Import" "~/mail/SINBOX.CRASH")
413 ;       (list vm-sysadmin-inbox "/var/spool/mail/sysadmin" "~/mail/SINBOX.CRASH")
414 ; (list "/u/ijackson/mail/INBOX" "/u/ijackson/mbox" "/u/ijackson/mail/INBOX.CRASH")
415 ; (list "/u/ijackson/mail/INBOX" "/u/ijackson/mail/Outbound"
416 ;       "/u/ijackson/mail/INBOX.CRASH")
417 ; (list "/u/ijackson/mail/INBOX" "/u/ijackson/mail/Record" "/u/ijackson/mail/INBOX.CRASH")
418 ; (list "/u/ijackson/mail/INBOX" "/u/ijackson/mail/Import" "/u/ijackson/mail/INBOX.CRASH")
419 ;        (list "/u/ijackson/mail/INBOX"
420 ;         (concat "localhost:110:pass:ijackson:" ijackson-pop-password)
421 ;         "/u/ijackson/mail/INBOX.CRASH"))
422       vm-startup-with-summary nil
423       vm-summary-format "%3n %a %2d %3m  %-19.19F  %s\n"
424       mail-archive-file-name "~/mail/Outbound"
425       vm-mime-8bit-text-transfer-encoding '8bit)
426 ;
427 (add-hook 'vm-mode-hook
428           '(lambda ()
429              (local-set-key "Q" 'vm-quit)
430              (local-set-key "q" "###Q")))
431 (add-hook 'mail-mode-hook
432           '(lambda ()
433              (if (and (boundp 'folder-buffer)
434                       folder-buffer
435                       (string= (buffer-file-name folder-buffer)
436                                (file-truename vm-sysadmin-inbox)))
437                  (progn
438                    (make-local-variable 'vm-mail-header-from)
439                    (setq vm-mail-header-from
440                          "sysadmin@chiark.greenend.org.uk (Ian Jackson)")
441                    (make-local-variable 'mail-archive-file-name)
442                    (setq mail-archive-file-name
443                          "~/mail/SOutbound")))))
444 ;
445 ;(defun vmi ()
446 ;  (interactive)
447 ;  (vm "/u/ijackson/mail/INBOX"))
448 ;;
449 (defun vms ()
450   (interactive)
451   (vm vm-sinbin-inbox))
452 ;
453 (defun make-session ()
454   "Makes this emacs hard to kill by requiring ^X^Cy to kill it
455 instead of just ^X^C."
456   (interactive)
457   (global-unset-key "\18\ 3")
458   (global-set-key "\18\ 3y" 'save-buffers-kill-emacs))
459 ;
460 ; Fix problems with M-| setting window title of emacs' parent xterm
461 (defun envdelete-term-termcap-windowid (list)
462   (let ((l list))
463     (mapcar '(lambda (x)
464                (if x (delq x l)))
465             (mapcar '(lambda (x)
466                        (if (or (string-match "^TERM=" x)
467                                (string-match "^TERMCAP=" x)
468                                (string-match "^WINDOWID=" x))
469                            x
470                          nil))
471                     l))
472     l))
473 (setq process-environment
474       (envdelete-term-termcap-windowid process-environment))
475 ;
476 (defun add-insertion-keys (table)
477   "Adds keybindings according to TABLE.  Each element of
478 TABLE should be a four-element list.
479
480 BINDING should be the key to bind; FUNCTION will be the name of the
481 function defined to do the insertion; DESCRIPTION will be inserted
482 into \"Inserts ... .\", and used as the descriptive string for the
483 generated function; STRING is the string which will actually be
484 inserted into the buffer when the keystroke is pressed."
485   (while table
486     (let* ((head (car table))
487            (key (car head))
488            (func (nth 1 head))
489            (desc (nth 2 head))
490            (string (nth 3 head)))
491       (defalias func
492         (list
493          'lambda () 
494          (concat "Inserts " desc ".")
495          '(interactive)
496          (list 'insert string)))
497       (funcall 'local-set-key key func))
498     (setq table (cdr table))))
499
500 (defun ian-sgml-setup ()
501   (interactive)
502   (add-insertion-keys
503    '(("\ 3\r" sgml-insert-new-para "new paragraph markup" "\n<p>\n")
504      ("\ 3\14" sgml-insert-tt-emph "tt emph markup" "<tt/")
505      ("\ 3\10" sgml-insert-prgn-emph "prgn emph markup" "<prgn/")
506      ("\ 3\ 5" sgml-insert-em-emph "em emfh markup" "<em/")
507      ("\ 3\16" sgml-insert-var-empfh "var emph markup" "<var/"))))
508 (setq sgml-local-catalogs '("/jura:/usr/lib/debiandoc-sgml/sgml/catalog"))
509   
510 (add-hook 'sgml-mode-hook 'ian-sgml-setup)
511 ;
512 (defvar cite-string "> " "String to insert when citing")
513 ;
514 (defun cite-region (start end)
515   "Quote each line in the region with an angle-bracket and space.
516
517 The citation string is taken from cite-string."
518   (interactive "r")
519   (save-excursion
520     (save-restriction
521       (narrow-to-region start end)
522       (goto-char (point-min))
523       (insert cite-string)
524       (while
525           (and
526            (= (forward-line) 0)
527            (> (point-max) (point)))
528         (insert cite-string)))))
529 ;
530 ; End of this file.