Mercurial > hgrepos > hgweb.cgi > yatex
diff yatexlib.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 |
line wrap: on
line diff
--- a/yatexlib.el Sun Dec 21 14:20:01 2014 +0900 +++ b/yatexlib.el Mon Dec 22 00:01:30 2014 +0900 @@ -1,7 +1,7 @@ ;;; yatexlib.el --- YaTeX and yahtml common libraries ;;; ;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 21 14:15:24 2014 on firestorm +;;; Last modified Sun Dec 21 23:55:30 2014 on firestorm ;;; $Id$ ;;; Code: @@ -481,7 +481,7 @@ (defun point-end-of-line () (save-excursion (end-of-line)(point))) - +(defun YaTeX-showup-buffer-bottom-most (x) (nth 3 (window-edges x))) ;;;###autoload (defun YaTeX-showup-buffer (buffer &optional func select) "Make BUFFER show up in certain window (but current window) @@ -514,6 +514,9 @@ ;(other-window 1);This does not work properly on Emacs-19 (select-window (get-lru-window)) (switch-to-buffer buffer) + (if (< (window-height) (/ YaTeX-default-pop-window-height 2)) + (enlarge-window (- YaTeX-default-pop-window-height + (window-height)))) (or select (select-window window))) (t ;if one-window (cond @@ -780,6 +783,25 @@ (throw 'found (car l))) (setq l (cdr l))))))))) +(defun YaTeX-set-file-coding-system (code coding) + "Set current buffer's coding system according to symbol." + (cond ((null code) + nil) + ((boundp 'MULE) + (set-file-coding-system coding)) + ((and YaTeX-emacs-20 (boundp 'buffer-file-coding-system)) + (setq buffer-file-coding-system + (or (and (fboundp 'set-auto-coding) buffer-file-name + (save-excursion + (goto-char (point-min)) + (set-auto-coding buffer-file-name (buffer-size)))) + coding))) + ((featurep 'mule) + (set-file-coding-system coding)) + ((boundp 'NEMACS) + (make-local-variable 'kanji-fileio-code) + (setq kanji-fileio-code code)))) + (defun YaTeX-insert-file-contents (file visit &optional beg end) (cond ((and (string< "19" emacs-version) (not (featurep 'xemacs)))