File: install-tfb.el

package info (click to toggle)
yatex 1.82-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,072 kB
  • sloc: lisp: 15,155; makefile: 194; ruby: 92; sh: 76
file content (33 lines) | stat: -rw-r--r-- 1,083 bytes parent folder | download | duplicates (4)
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
(defun bcf-and-exit ()
  "Byte compile rest of argument and kill-emacs."
  (if command-line-args-left
      (let ((load-path (cons "." load-path)))
	(and (fboundp 'set-language-environment)
	     (featurep 'mule)
	     (set-language-environment "Japanese"))
	(mapcar 'byte-compile-file command-line-args-left)
	(kill-emacs))))

(defun tfb-and-exit ()
  "Texinfo-format-buffer and kill-emacs."
  (if command-line-args-left
      (let ((load-path (cons ".." load-path)))
	(and (fboundp 'set-language-environment)
	     (featurep 'mule)
	     (set-language-environment "Japanese"))
	(mapcar (function
		 (lambda (arg)
		   (find-file arg)
		   (texinfo-format-buffer)
		   (cond
		    ((fboundp 'set-buffer-file-coding-system)
		     (set-buffer-file-coding-system 'utf-8-unix))
		    ((fboundp 'set-file-coding-system)
		     (set-file-coding-system '*utf-8*unix))
		    ((boundp 'NEMACS)
		     (set (make-local-variable 'kanji-fileio-code) 1)))
		   (let ((coding-system-for-write buffer-file-coding-system))
		     (basic-save-buffer))))
		command-line-args-left)
	(kill-emacs))))