Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatexhlp.el @ 354:5465428f5a68 dev
`[prefix] t e' displays typesetting image in the next window, if possible.
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 22 Dec 2014 00:01:30 +0900 |
parents | 2a72779d9c50 |
children | d69fd7b1ac4d |
comparison
equal
deleted
inserted
replaced
353:2a72779d9c50 | 354:5465428f5a68 |
---|---|
1 ;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros | 1 ;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros |
2 ;;; | 2 ;;; |
3 ;;; (c)1994,1998,2004,2014 by HIROSE Yuuji.[yuuji@yatex.org] | 3 ;;; (c)1994,1998,2004,2014 by HIROSE Yuuji.[yuuji@yatex.org] |
4 ;;; Last modified Sun Dec 21 14:14:34 2014 on firestorm | 4 ;;; Last modified Sun Dec 21 22:55:07 2014 on firestorm |
5 ;;; $Id$ | 5 ;;; $Id$ |
6 | 6 |
7 ;;; Code: | 7 ;;; Code: |
8 (let ((help-file (concat "YATEXHLP." | 8 (let ((help-file (concat "YATEXHLP." |
9 (cond (YaTeX-japan "jp") | 9 (cond (YaTeX-japan "jp") |
157 de (progn | 157 de (progn |
158 (re-search-forward | 158 (re-search-forward |
159 (concat "^" (regexp-quote YaTeX-help-delimiter)) nil 1) | 159 (concat "^" (regexp-quote YaTeX-help-delimiter)) nil 1) |
160 (- (point) (length YaTeX-help-delimiter)))) | 160 (- (point) (length YaTeX-help-delimiter)))) |
161 (YaTeX-showup-buffer | 161 (YaTeX-showup-buffer |
162 hbuf (function (lambda (x) (nth 3 (window-edges x)))) t) | 162 hbuf 'YaTeX-showup-buffer-bottom-most t) |
163 (set-buffer hbuf) | 163 (set-buffer hbuf) |
164 (setq buffer-read-only nil) | 164 (setq buffer-read-only nil) |
165 (if append (goto-char (point-max)) (erase-buffer)) | 165 (if append (goto-char (point-max)) (erase-buffer)) |
166 (insert YaTeX-help-synopsis "\n") | 166 (insert YaTeX-help-synopsis "\n") |
167 (insert-buffer-substring hfbuf sb se) | 167 (insert-buffer-substring hfbuf sb se) |
224 (defun YaTeX-help-prepare-entry (command help-file) | 224 (defun YaTeX-help-prepare-entry (command help-file) |
225 "Read help description on COMMAND and add it to HELP-FILE." | 225 "Read help description on COMMAND and add it to HELP-FILE." |
226 (let ((buf (get-buffer-create "**Description**")) | 226 (let ((buf (get-buffer-create "**Description**")) |
227 (conf (current-window-configuration))) | 227 (conf (current-window-configuration))) |
228 (YaTeX-showup-buffer | 228 (YaTeX-showup-buffer |
229 buf (function (lambda (x) (nth 3 (window-edges x)))) t) | 229 buf 'YaTeX-showup-buffer-bottom-most t) |
230 (make-local-variable 'YaTeX-help-file-current) | 230 (make-local-variable 'YaTeX-help-file-current) |
231 (make-local-variable 'YaTeX-help-command-current) | 231 (make-local-variable 'YaTeX-help-command-current) |
232 (make-local-variable 'YaTeX-help-saved-config) | 232 (make-local-variable 'YaTeX-help-saved-config) |
233 (setq YaTeX-help-file-current help-file | 233 (setq YaTeX-help-file-current help-file |
234 YaTeX-help-command-current command | 234 YaTeX-help-command-current command |
264 (let ((hb (find-file-noselect help-file)) | 264 (let ((hb (find-file-noselect help-file)) |
265 (ab (get-buffer-create YaTeX-help-buffer)) | 265 (ab (get-buffer-create YaTeX-help-buffer)) |
266 (sw (selected-window)) | 266 (sw (selected-window)) |
267 (head (concat "^" (regexp-quote YaTeX-help-delimiter))) | 267 (head (concat "^" (regexp-quote YaTeX-help-delimiter))) |
268 pt command) | 268 pt command) |
269 (YaTeX-showup-buffer | 269 (YaTeX-showup-buffer ab 'YaTeX-showup-buffer-bottom-most) |
270 ab (function (lambda (x) (nth 3 (window-edges x))))) | |
271 (select-window (get-buffer-window ab)) | 270 (select-window (get-buffer-window ab)) |
272 (set-buffer ab) ;assertion | 271 (set-buffer ab) ;assertion |
273 (setq buffer-read-only nil) | 272 (setq buffer-read-only nil) |
274 (or append (erase-buffer)) | 273 (or append (erase-buffer)) |
275 (set-buffer hb) | 274 (set-buffer hb) |