0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Emacs Lisp 超初心者がコマンドを作ってみる 〜 フレームを最前面に 〜

Posted at

はじめに

別フレーム表示で微妙な点として、他のEmacs フレームや、他のいわゆるウインドウの後ろだと、そのまま Ediff 実行してしまうという現象が出ました。

そこで Ediff 実行時に最前面に持ってくるようにします。

指定フレームを再前面に持ってくる

変更箇所

; (前略)
(with-selected-frame (car frames)
    ;; pepm-frame try to most front
    (select-frame-set-input-focus (selected-frame))
    ;; run ediff
    (ediff-regions-internal
; (後略)

select-frame-set-input-focus 一発で良いようです。 手元ではEmacs フレームのみならず他のいわゆるウインドウ(Google Chromeのウインド等)も含めて最前面に表示してくれているようです。

指定フレームは with-selected-frame の中なので単に(selected-frame) するだけです。

当該フレームが iconify されていても復元し、最前面に持ってきてくれています。

今回はここまで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?