1 |
;; Calculator for GNU Emacs, maintenance routines |
;; Calculator for GNU Emacs, maintenance routines |
2 |
;; Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
3 |
;; Written by Dave Gillespie, daveg@synaptics.com. |
;; Written by Dave Gillespie, daveg@synaptics.com. |
4 |
|
|
5 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
42 |
(calc-do-compile)) |
(calc-do-compile)) |
43 |
(fset 'message old-message) |
(fset 'message old-message) |
44 |
(fset 'write-region old-write-region))) |
(fset 'write-region old-write-region))) |
45 |
(calc-do-compile)) |
(calc-do-compile))) |
|
) |
|
46 |
|
|
47 |
(defun calc-do-compile () |
(defun calc-do-compile () |
48 |
(let ((make-backup-files nil) |
(let ((make-backup-files nil) |
132 |
(sort rules 'string<)) |
(sort rules 'string<)) |
133 |
(save-buffer)))) |
(save-buffer)))) |
134 |
(error (message "Unable to pre-build tables %s" err)))) |
(error (message "Unable to pre-build tables %s" err)))) |
135 |
(message "Done. Don't forget to install with \"make public\" or \"make private\".")) |
(message "Done. Don't forget to install with \"make public\" or \"make private\"."))) |
|
) |
|
136 |
|
|
137 |
(defun calc-compile-message (fmt &rest args) |
(defun calc-compile-message (fmt &rest args) |
138 |
(cond ((and (= (length args) 2) |
(cond ((and (= (length args) 2) |
164 |
(send-string-to-terminal (apply 'format fmt args))) |
(send-string-to-terminal (apply 'format fmt args))) |
165 |
((string-match "\\(Preparing\\|Building\\).*\\.\\.\\. *done$" fmt) |
((string-match "\\(Preparing\\|Building\\).*\\.\\.\\. *done$" fmt) |
166 |
(send-string-to-terminal "done\n")) |
(send-string-to-terminal "done\n")) |
167 |
(t (apply old-message fmt args))) |
(t (apply old-message fmt args)))) |
|
) |
|
168 |
|
|
169 |
(defun calc-compile-write-region (start end filename &optional append visit &rest rest) |
(defun calc-compile-write-region (start end filename &optional append visit &rest rest) |
170 |
(if (eq visit t) |
(if (eq visit t) |
179 |
(setq end (point-max)))) |
(setq end (point-max)))) |
180 |
(apply old-write-region start end filename append 'quietly rest) |
(apply old-write-region start end filename append 'quietly rest) |
181 |
(message "Wrote %s" filename) |
(message "Wrote %s" filename) |
182 |
nil |
nil) |
|
) |
|
183 |
|
|
184 |
|
|
185 |
|
|
237 |
(goto-char 1)) |
(goto-char 1)) |
238 |
(message (cond ((eq part 1) "Wrote file calctut.tex") |
(message (cond ((eq part 1) "Wrote file calctut.tex") |
239 |
((eq part 2) "Wrote file calcref.tex") |
((eq part 2) "Wrote file calcref.tex") |
240 |
(t "Wrote files calctut.tex and calcref.tex"))) |
(t "Wrote files calctut.tex and calcref.tex")))) |
|
) |
|
241 |
|
|
242 |
(defun calc-split-volume (number fix name other-name) |
(defun calc-split-volume (number fix name other-name) |
243 |
(goto-char 1) |
(goto-char 1) |
265 |
(while (search-forward "@c [not-split]\n" nil t) |
(while (search-forward "@c [not-split]\n" nil t) |
266 |
(while (not (looking-at "@c")) |
(while (not (looking-at "@c")) |
267 |
(insert "@c ") |
(insert "@c ") |
268 |
(forward-line 1))) |
(forward-line 1)))) |
|
) |
|
269 |
|
|
270 |
|
|
271 |
(defun calc-inline-summary () |
(defun calc-inline-summary () |
272 |
"Make a special \"calcsum.tex\" file to be used with main manual." |
"Make a special \"calcsum.tex\" file to be used with main manual." |
273 |
(calc-split-summary nil t) |
(calc-split-summary nil t)) |
|
) |
|
274 |
|
|
275 |
(defun calc-split-summary (&optional force in-line) |
(defun calc-split-summary (&optional force in-line) |
276 |
"Make a special \"calcsum.tex\" file with just the Calc summary." |
"Make a special \"calcsum.tex\" file with just the Calc summary." |
385 |
"Unable to find Key Index (calc.ky); no page numbers inserted")) |
"Unable to find Key Index (calc.ky); no page numbers inserted")) |
386 |
(switch-to-buffer buf)) |
(switch-to-buffer buf)) |
387 |
(save-buffer)) |
(save-buffer)) |
388 |
(message "Wrote file calcsum.tex") |
(message "Wrote file calcsum.tex")) |
|
) |
|
389 |
|
|
390 |
|
|
391 |
|
|
406 |
(find-file name) |
(find-file name) |
407 |
(if buffer-read-only (error "No write permission for \"%s\"" buffer-file-name)) |
(if buffer-read-only (error "No write permission for \"%s\"" buffer-file-name)) |
408 |
(goto-char (point-max)) |
(goto-char (point-max)) |
409 |
(calc-add-autoloads home "calc-public-autoloads")) |
(calc-add-autoloads home "calc-public-autoloads"))) |
|
) |
|
410 |
|
|
411 |
(defun calc-private-autoloads () |
(defun calc-private-autoloads () |
412 |
"Modify the user's \".emacs\" file to contain the necessary autoload and |
"Modify the user's \".emacs\" file to contain the necessary autoload and |
415 |
(let ((home default-directory)) |
(let ((home default-directory)) |
416 |
(find-file "~/.emacs") |
(find-file "~/.emacs") |
417 |
(goto-char (point-max)) |
(goto-char (point-max)) |
418 |
(calc-add-autoloads home "calc-private-autoloads")) |
(calc-add-autoloads home "calc-private-autoloads"))) |
|
) |
|
419 |
|
|
420 |
(defun calc-add-autoloads (home cmd) |
(defun calc-add-autoloads (home cmd) |
421 |
(barf-if-buffer-read-only) |
(barf-if-buffer-read-only) |
448 |
\(global-set-key \"\\e#\" 'calc-dispatch) |
\(global-set-key \"\\e#\" 'calc-dispatch) |
449 |
;;; End of Calc autoloads.\n") |
;;; End of Calc autoloads.\n") |
450 |
(let ((trim-versions-without-asking t)) |
(let ((trim-versions-without-asking t)) |
451 |
(save-buffer)) |
(save-buffer))) |
|
) |
|
|
|
|
|
|
|
452 |
|
|
453 |
;;; End. |
;;; calc-maint.el ends here |