«前の日記(2010-07-01) 最新 次の日記(2010-07-15)» 編集

ソフトウェアと本の覚え書き

2005|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|

2010-07-05 [長年日記]

_ [Emacs] one-key-help-window-open の修正

横長ディスプレイで one-key を実行して、縦に画面が分割されると表示が乱れる。one-key-help-window-open でバッファに書き込んでから pop-to-buffer しているので、window-size の取得がうまくいっていない。そこで次のように変更して、これらの順番を逆にする。

(defun one-key-help-window-open (title info-alist)
  "Open the help window.
Argument TITLE is title name for help information.
Argument INFO-ALIST is help information as format ((key . describe) . command)."
  ;; Save current window configuration.
  (or one-key-help-window-configuration
      (setq one-key-help-window-configuration (current-window-configuration)))
  ;; Generate buffer information.
  (if (get-buffer one-key-buffer-name)
      (pop-to-buffer one-key-buffer-name)
    (with-current-buffer (get-buffer-create one-key-buffer-name)
      (pop-to-buffer one-key-buffer-name)
      (goto-char (point-min))
      (save-excursion
        (insert (one-key-highlight-help
                 title
                 (one-key-help-format info-alist))))))
  ;; Pop `one-key' buffer.
  (set-buffer one-key-buffer-name)
  ;; Adjust height of help window
  ;; to display buffer's contents exactly.
  (fit-window-to-buffer nil one-key-help-window-max-height))