diff options
| author | Paul Nelson <ultrono@gmail.com> | 2025-04-02 09:09:41 +0200 |
|---|---|---|
| committer | Paul Nelson <ultrono@gmail.com> | 2025-04-02 09:09:41 +0200 |
| commit | 0b4a3f5bccad9d6107d3069a2aae22b33ac2015b (patch) | |
| tree | 45ce18937211b44094058b6958eeca3eab1d9b41 | |
| parent | 30b6c7d89f9c3f1aaf0e6e00620f41d58660a277 (diff) | |
Simplify doc-dual-view-modes structure
* doc-dual-view.el (doc-dual-view-modes): Remove redisplay-func
parameter from structure. Update docstring to accurately describe the
new simplified format. Add clarifying comments for PDF mode lambda
functions.
| -rw-r--r-- | doc-dual-view.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/doc-dual-view.el b/doc-dual-view.el index f8a69ab..2732720 100644 --- a/doc-dual-view.el +++ b/doc-dual-view.el @@ -46,24 +46,23 @@ (pdf-view-goto-page pdf-view-next-page-command pdf-view-previous-page-command) - (lambda () (pdf-view-current-page)) - (lambda () (pdf-cache-number-of-pages)) - pdf-view-goto-page) + (lambda () (pdf-view-current-page)) ; convert macro to function + (lambda () (pdf-cache-number-of-pages))) (doc-view-mode (doc-view-goto-page doc-view-next-page doc-view-previous-page) (lambda () (doc-view-current-page)) - (lambda () (doc-view-last-page-number)) - doc-view-goto-page)) + (lambda () (doc-view-last-page-number)))) "Alist for supported modes. -Given by (major-mode (goto-funcs) current-page-func max-page-func -redisplay-func)." +List of mode-specific functions of the form + +(MAJOR-MODE GOTO-FUNCTIONS CURRENT-PAGE-FUNCTION MAX-PAGE-FUNCTION), + +where GOTO-FUNCTIONS is of the form (GOTO-FUNC NEXT-FUNC PREV-FUNC)." :type '(repeat (list (symbol :tag "Major Mode") (repeat :tag "Goto Page Functions" symbol) (function :tag "Current Page Function") - (function :tag "Max Page Function") - (function :tag "Redisplay Function")))) (function :tag "Max Page Function")))) (defun doc-dual-view--order-windows (windows) |
