Emacs Part 40
■ このスレッドは過去ログ倉庫に格納されています
0656名無しさん@お腹いっぱい。
2012/07/18(水) 12:49:24.85添削してけれ
(global-set-key (kbd "C-z C-l") 'switch-last-window-configure)
(defun switch-last-window-configure (&optional silent)
"ウィンドウ分割状態を切り替える.
SILENT が non-nil の場合は切り替えメッセージを表示しない.
2状態固定."
(interactive)
(let* ((cur (current-window-configuration))
(state (frame-parameter nil 'last-window-state))
(conf (car state))
(side (case (cdr state) (?A ?B) (?B ?A) (t ?B))))
(if conf
(set-window-configuration conf)
(delete-other-windows))
(unless silent
(message "Switching to side \"%c\"." side))
(set-frame-parameter nil 'last-window-state (cons cur side))
(force-mode-line-update)))
;; フレームタイトルに状態を表示する
(setq frame-title-format
(append (if (atom frame-title-format)
(list frame-title-format)
frame-title-format)
'((:eval (let ((state (frame-parameter nil 'last-window-state)))
(when state (format " [%c]" (cdr state))))))))
■ このスレッドは過去ログ倉庫に格納されています