/[emacs]/emacs/lisp/textmodes/makeinfo.el
ViewVC logotype

Diff of /emacs/lisp/textmodes/makeinfo.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by ttn, Sat Aug 6 17:41:14 2005 UTC revision 1.20 by rfrancoise, Sat Aug 27 16:11:44 2005 UTC
# Line 171  command to gain use of `next-error'." Line 171  command to gain use of `next-error'."
171                       makeinfo-options                       makeinfo-options
172                       " "                       " "
173                       makeinfo-temp-file)                       makeinfo-temp-file)
174               "Use `makeinfo-buffer' to gain use of the `next-error' command"               t
              nil  
175               'makeinfo-compilation-sentinel-region)))))))               'makeinfo-compilation-sentinel-region)))))))
176    
177  ;;; Actually run makeinfo.  COMMAND is the command to run.  (defun makeinfo-next-error (arg reset)
178  ;;; ERROR-MESSAGE is what to say when next-error can't find another error.    "This function is used to disable `next-error' if the user has
179  ;;; If PARSE-ERRORS is non-nil, do try to parse error messages.  used `makeinfo-region'.  Since the compilation process is used on
180  (defun makeinfo-compile (command error-message parse-errors sentinel)  a temporary file in that case, calling `next-error' would give
181    (let ((buffer  nonsensical results."
182           (compile-internal command error-message nil    (error "Use `makeinfo-buffer' to gain use of the `next-error' command"))
183                             (and (not parse-errors)  
184                                  ;; If we do want to parse errors, pass nil.  ;; Actually run makeinfo.  COMMAND is the command to run.  If
185                                  ;; Otherwise, use this function, which won't  ;; DISABLE-ERRORS is non-nil, disable `next-error' by setting
186                                  ;; ever find any errors.  ;; `next-error-function' to `makeinfo-next-error' in the compilation
187                                  (lambda (&rest ignore)  ;; buffer.
188                                    (setq compilation-error-list nil))))))  (defun makeinfo-compile (command disable-errors sentinel)
189      (let ((buffer (compilation-start command)))
190        (with-current-buffer buffer
191          (setq next-error-function
192                (if disable-errors
193                    'makeinfo-next-error
194                  'compilation-next-error-function)))
195      (set-process-sentinel (get-buffer-process buffer) sentinel)))      (set-process-sentinel (get-buffer-process buffer) sentinel)))
196    
197  ;; Delete makeinfo-temp-file after processing is finished,  ;; Delete makeinfo-temp-file after processing is finished,
# Line 249  Use the \\[next-error] command to move t Line 254  Use the \\[next-error] command to move t
254    (save-excursion    (save-excursion
255      (makeinfo-compile      (makeinfo-compile
256       (concat makeinfo-run-command " " makeinfo-options       (concat makeinfo-run-command " " makeinfo-options
257               " " buffer-file-name)               " " buffer-file-name)
258       "No more errors."       nil
      t  
259       'makeinfo-compilation-sentinel-buffer)))       'makeinfo-compilation-sentinel-buffer)))
260    
261  (defun makeinfo-compilation-sentinel-buffer (proc msg)  (defun makeinfo-compilation-sentinel-buffer (proc msg)

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26