File: emacsen-startup

package info (click to toggle)
a2ps 1%3A4.14-1.1%2Bdeb6u1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 12,324 kB
  • ctags: 4,908
  • sloc: ansic: 26,659; sh: 13,155; lex: 2,286; perl: 1,156; yacc: 757; makefile: 605; lisp: 398; ada: 263; objc: 189; f90: 109; ml: 85; sql: 74; pascal: 57; modula3: 33; haskell: 32; sed: 30; java: 29; python: 24
file content (47 lines) | stat: -rw-r--r-- 1,624 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian a2ps package
;;
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
;; Modified by Dirk Eddelbuettel <edd@debian.org>
;; Adapted for dh-make by Jim Van Zandt <jrv@vanzandt.mv.com>

;; The a2ps package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...).  The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
(setq load-path (cons (concat "/usr/share/"
                              (symbol-name flavor)
			      "/site-lisp/a2ps") load-path))
;; a2ps
(autoload 'a2ps-mode "a2ps" nil t)
(setq auto-mode-alist
      (cons '(".*\\.a2ps$" . a2ps-mode)
	    auto-mode-alist))

;; a2ps-print
(autoload 'a2ps-buffer "a2ps-print"
  "Print buffer contents as with Unix command `a2ps'.
    `a2ps-switches' is a list of extra switches (strings) to pass to a2ps."
  t)
(autoload 'a2ps-region "a2ps-print"
  "Print region contents as with Unix command `a2ps'.
    `a2ps-switches' is a list of extra switches (strings) to pass to a2ps."
  t)

(if (featurep 'xemacs)
    (progn
     (global-set-key 'f22 'a2ps-buffer)
     (global-set-key '(shift f22) 'a2ps-region-1)
     (add-menu-button '("File") ["a2ps-print" a2ps-buffer "--"])
     )
  (progn
   (global-set-key [f22] 'a2ps-buffer)
   (global-set-key [S-f22] 'a2ps-region-1)
   (define-key-after menu-bar-files-menu [a2ps-print]
     '(menu-item "a2ps" a2ps-buffer :help "Print with a2ps")
     'ps-print-region)
   )
  )