| 1 |
;; -*-emacs-lisp-*- |
| 2 |
;; |
| 3 |
;; Emacs startup file for the Debian a2ps package |
| 4 |
;; |
| 5 |
;; Originally contributed by Nils Naumann <[email protected]> |
| 6 |
;; Modified by Dirk Eddelbuettel <[email protected]> |
| 7 |
;; Adapted for dh-make by Jim Van Zandt <[email protected]> |
| 8 |
|
| 9 |
;; The a2ps package follows the Debian/GNU Linux 'emacsen' policy and |
| 10 |
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, |
| 11 |
;; xemacs19, emacs20, xemacs20...). The compiled code is then |
| 12 |
;; installed in a subdirectory of the respective site-lisp directory. |
| 13 |
;; We have to add this to the load-path: |
| 14 |
(setq load-path (cons (concat "/usr/share/" |
| 15 |
(symbol-name flavor) |
| 16 |
"/site-lisp/a2ps") load-path)) |
| 17 |
;; a2ps |
| 18 |
(autoload 'a2ps-mode "a2ps" nil t) |
| 19 |
(setq auto-mode-alist |
| 20 |
(cons '(".*\\.a2ps$" . a2ps-mode) |
| 21 |
auto-mode-alist)) |
| 22 |
|
| 23 |
;; a2ps-print |
| 24 |
(autoload 'a2ps-buffer "a2ps-print" |
| 25 |
"Print buffer contents as with Unix command `a2ps'. |
| 26 |
`a2ps-switches' is a list of extra switches (strings) to pass to a2ps." |
| 27 |
t) |
| 28 |
(autoload 'a2ps-region "a2ps-print" |
| 29 |
"Print region contents as with Unix command `a2ps'. |
| 30 |
`a2ps-switches' is a list of extra switches (strings) to pass to a2ps." |
| 31 |
t) |
| 32 |
|
| 33 |
(if (featurep 'xemacs) |
| 34 |
(progn |
| 35 |
(global-set-key 'f22 'a2ps-buffer) |
| 36 |
(global-set-key '(shift f22) 'a2ps-region-1) |
| 37 |
(add-menu-button '("File") ["a2ps-print" a2ps-buffer "--"]) |
| 38 |
) |
| 39 |
(progn |
| 40 |
(global-set-key [f22] 'a2ps-buffer) |
| 41 |
(global-set-key [S-f22] 'a2ps-region-1) |
| 42 |
(define-key-after menu-bar-files-menu [a2ps-print] |
| 43 |
'(menu-item "a2ps" a2ps-buffer :help "Print with a2ps") |
| 44 |
'ps-print-region) |
| 45 |
) |
| 46 |
) |
| 47 |
|