diff options
| author | Stefan Monnier | 2018-06-21 23:30:11 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2018-06-21 23:30:11 -0400 |
| commit | a5511956b483e22cfebc0ebeb54d83c95f852648 (patch) | |
| tree | f708410de024fafadde9317447ea999734c44fd7 /etc | |
| parent | 8a7475ca796ecd5816fab9f11baf07bcc395d951 (diff) | |
| download | emacs-a5511956b483e22cfebc0ebeb54d83c95f852648.tar.gz emacs-a5511956b483e22cfebc0ebeb54d83c95f852648.zip | |
New functions to switch back and forth to another major mode
* subr.el (major-mode--suspended): New var.
(major-mode-suspend, major-mode-restore): New funs, extracted from doc-view.
* doc-view.el (doc-view--previous-major-mode): Remove.
(doc-view-mode): Use major-mode-suspend.
(doc-view-fallback-mode): Use major-mode-restore.
* hexl-mode.el (hexl-mode--minor-mode-p, hexl-mode--setq-local): Remove.
(hexl-mode): Use major-mode-suspend and hexl-follow-ascii-mode.
(hexl-mode-exit): Use major-mode-restore.
(hexl-activate-ruler, hexl-follow-line): Don't bother trying to preserve
earlier state, now that entering/leaving hexl-mode kills local vars.
(hexl-follow-ascii-mode): New proper local minor mode.
(hexl-follow-ascii): Rewrite, using it.
* image-mode.el (image-mode-previous-major-mode): Remove.
(image-mode): Use major-mode-suspend.
(image-mode-to-text): Use major-mode-restore.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -658,6 +658,10 @@ manual for more details. | |||
| 658 | 658 | ||
| 659 | * Lisp Changes in Emacs 27.1 | 659 | * Lisp Changes in Emacs 27.1 |
| 660 | 660 | ||
| 661 | ** New functions 'major-mode-suspend' and 'major-mode-restore' | ||
| 662 | Used when switching temporarily to another major mode, e.g. for hexl-mode, | ||
| 663 | or to switch between c-mode and image-mode in XPM. | ||
| 664 | |||
| 661 | +++ | 665 | +++ |
| 662 | ** New macro 'dolist-with-progress-reporter'. | 666 | ** New macro 'dolist-with-progress-reporter'. |
| 663 | This works like 'dolist', but reports progress similar to | 667 | This works like 'dolist', but reports progress similar to |