emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yet another doc-view patch


From: Tassilo Horn
Subject: Yet another doc-view patch
Date: Fri, 19 Oct 2007 14:57:16 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Hi all,

this patch (below or from [1]) implements the following:

  - New minor mode: doc-view-minor-mode which has only one binding C-c
    C-c to switch to doc-view-mode.

  - New function: doc-view-mode-maybe.  If there's another mode for this
    file type in auto-mode-alist (like ps-mode), then use that mode and
    enable doc-view-minor-mode, else enable doc-view-mode.

  - fixed some bugs.

The results are, that opening a e?ps file opens it with ps-mode (as
auto-mode-alist says) and toggles doc-view-minor-mode on.  With C-c C-c
you can toggle between the editing mode found in auto-mode-alist and
doc-view-mode.  If you edited a e?ps file and toggle to d-v-m you'll be
asked to save your changes and the doc will be reconverted.

Currently, C-c C-c for PDF and DVI files will re-open them with
doc-view-mode again, because that's what auto-mode-alist tells.  I
suggest we take the doc-view-mode entries out of auto-mode-alist and
replace them with the proper editing modes, e.g. ps-mode for PDF files
(is that correct?) and fundamental-mode for DVI files.  Then we can add
autoload-cookies similar to the one for e?ps files to doc-view.el and
everything behaves similar for all types of document files.

If you agree, feel free to change that before committing.

Bye,
Tassilo
__________
[1] http://www.tsdh.de/stuff/doc-view.patch




reply via email to

[Prev in Thread] Current Thread [Next in Thread]