~ubuntu-branches/ubuntu/quantal/muse-el/quantal

« back to all changes in this revision

Viewing changes to lisp/muse-book.el

  • Committer: Bazaar Package Importer
  • Author(s): Michael W. Olson (GNU address)
  • Date: 2008-01-09 15:51:46 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080109155146-0wwzermvvzs9rqzo
Tags: 3.11-3ubuntu1
* Merge with with Debian unstable (LP: #137284). Remaining Ubuntu changes:
  - Keep manual.
  - Set Ubuntu MOTU to be Maintainer

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
;; Emacs Muse is free software; you can redistribute it and/or modify
8
8
;; it under the terms of the GNU General Public License as published
9
 
;; by the Free Software Foundation; either version 2, or (at your
 
9
;; by the Free Software Foundation; either version 3, or (at your
10
10
;; option) any later version.
11
11
 
12
12
;; Emacs Muse is distributed in the hope that it will be useful, but
73
73
  :type 'string
74
74
  :group 'muse-book)
75
75
 
76
 
(defcustom muse-book-latex-footer "\n\\end{document}"
 
76
(defcustom muse-book-latex-footer
 
77
  "<lisp>(muse-latex-bibliography)</lisp>
 
78
\\end{document}"
77
79
  "Footer used for publishing books to LaTeX.  This may be text or a filename."
78
80
  :type 'string
79
81
  :group 'muse-book)
88
90
  (let ((muse-publishing-directives (list (cons "title" title)))
89
91
        (muse-publishing-current-file (cdr entry))
90
92
        (beg (point)) end)
91
 
    (insert-file-contents (cdr entry))
 
93
    (muse-insert-file-contents (cdr entry))
92
94
    (setq end (copy-marker (point-max) t))
93
95
    (muse-publish-markup-region beg end (car entry) style)
94
96
    (goto-char beg)
134
136
    (narrow-to-region (point) (point))
135
137
    (unwind-protect
136
138
        (progn
137
 
          (insert-file-contents file)
 
139
          (muse-insert-file-contents file)
138
140
          (muse-publish-markup
139
141
           "attributes"
140
142
           `(;; Remove leading and trailing whitespace from the file
256
258
          (goto-char (point-max))
257
259
          (if style-footer (muse-insert-file-or-string style-footer file))
258
260
          (run-hooks 'muse-after-book-publish-hook)
259
 
          (let ((backup-inhibited t))
260
 
            (write-file output-path))
261
 
          (if style-final
262
 
              (funcall style-final file output-path target)))))
 
261
          (if (muse-write-file output-path)
 
262
              (if style-final
 
263
                  (funcall style-final file output-path target))
 
264
            (setq published nil)))))
263
265
    (if published
264
266
        (message "The book \"%s\" has been published." file))
265
267
    published))