Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatexsec.el @ 532:5eb2b1d824f3 dev
Emacs26's switch-to-buffer does not keep logical point.
So we need to use set-window-buffer to bring current but non-interactive
buffer up to interactive buffer.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Wed, 30 May 2018 13:54:46 +0900 |
parents | 2011de73a671 |
children |
comparison
equal
deleted
inserted
replaced
531:6ea85aaae6f2 | 532:5eb2b1d824f3 |
---|---|
1 ;;; yatexsec.el --- YaTeX sectioning browser | 1 ;;; yatexsec.el --- YaTeX sectioning browser |
2 ;;; | 2 ;;; |
3 ;;; (c) 1994-2017 by HIROSE Yuuji [yuuji@yatex.org] | 3 ;;; (c) 1994-2017 by HIROSE Yuuji [yuuji@yatex.org] |
4 ;;; Last modified Sun Dec 21 14:16:35 2014 on firestorm | 4 ;;; Last modified Wed May 30 13:29:50 2018 on firestorm |
5 ;;; $Id$ | 5 ;;; $Id$ |
6 | 6 |
7 ;;; Code: | 7 ;;; Code: |
8 (defvar YaTeX-sectioning-level | 8 (defvar YaTeX-sectioning-level |
9 '(("part" . 0) | 9 '(("part" . 0) |
190 (unwind-protect | 190 (unwind-protect |
191 (progn | 191 (progn |
192 (other-window 1) | 192 (other-window 1) |
193 (setq sb (current-buffer)) | 193 (setq sb (current-buffer)) |
194 (switch-to-buffer hb) | 194 (switch-to-buffer hb) |
195 (setq buffer-read-only nil) ;; Emacs26 | |
195 (erase-buffer) | 196 (erase-buffer) |
196 (insert "===== View sectioning ===== | 197 (insert "===== View sectioning ===== |
197 C-p Up sectioning level. 0 Show only \\part, | 198 C-p Up sectioning level. 0 Show only \\part, |
198 C-n Down sectioning level. 1 and \\chapter, | 199 C-n Down sectioning level. 1 and \\chapter, |
199 C-v Scroll up *Sectioning line* buffer. 2 and \\section, | 200 C-v Scroll up *Sectioning line* buffer. 2 and \\section, |