🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.editor.xemacs
Article #249

Re: XEmacs からのプリント

#249
From: Seiichi Namba
Date: Thu, 14 Jun 2001 08:11
44 lines
2795 bytes
難波です。

GGB03631@nifty.ne.jp (Atushi Shinmura) さん writes:

> 便乗で済みませんが、ファイルメニューの「バッファを印刷」「バッファを清書
> 印刷」とprintボタンに関数 print-bufferを登録したいのですけど、
> XEmacs-20.4当時と違って、該当の場所(登録する相手先や方法)がわからずに
> 戸惑ってます。

いずれもキーマップだと思うので、基本的には define-key/define-key-after 
で行けるように思うんですが、(他も多数違いがあるようだが)xemacs の 
GUI は全く判らないので他の方にお任せします。

(xemacs の) elisp の info を調べるか、$lisp の下を
find -type f | grep el$ | xargs grep save-buffer
とでもすれば、登録をやってる個所はみつかるのではないですかね。

また、define-key-after なり、define-key をdescribe-function すれば説明
が出るんじゃないかしら。

define-key-after の場合は、その after と指定する対象のアイテムが
無ければ失敗するので、そのアイテムがなくなってる、とかそういう
問題ですかね。

あるいは easymenu (とかそういうのが xemacs にもあったとして)を使って
いる場合はその仕様が変更になったとか。

いずれにしても、前から設定に使ってた関数を describe-function で確認、
はまずやるべきでしょうね。

> メニューとボタンの3個所の一気登録ってできませんでしょうか?

そういう需要は稀だと思うので、無いんじゃないですかね。


ちなみに、emacs-21 の場合はツールバーのボタンに関しては
tool-bar.el というのがあって、
tool-bar-add-item(icon def key &rest props)
という関数が使えるようです。その最後のところは

(define-key-after tool-bar-map (vector key)
        `(menu-item ,(symbol-name key) ,def :image ,image ,@props))

などと書いてあります。
Technical Details
Message-ID: <9g9rkd$o3m$1@sn.asahi-net.email.ne.jp>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!komachi.sp.cs.cmu.edu!Q.T.Honey!nf.asahi-net.or.jp!not-for-mail
References: <m0snhbwyjo.fsf@maria.issui.co> <86y9r37lnj.fsf@thelonious.smoke.or.jp> <m0g0dbnv16.fsf@maria.issui.co>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 1107f7,746a6b555fb5d4be
X-Google-Attributes: gid1107f7,public
X-Google-ArrivalTime: 2001-06-14 01:11:56 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!komachi.sp.cs.cmu.edu!Q.T.Honey!nf.asahi-net.or.jp!not-for-mail
From: Seiichi Namba <sn@asahi-net.email.ne.jp>
Newsgroups: fj.editor.xemacs
Subject: Re: XEmacs からのプリント
Date: 14 Jun 2001 17:11:56 +0900
Organization: Smoke
Message-ID: <9g9rkd$o3m$1@sn.asahi-net.email.ne.jp>
References: <m0snhbwyjo.fsf@maria.issui.co> <86y9r37lnj.fsf@thelonious.smoke.or.jp> <m0g0dbnv16.fsf@maria.issui.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 8bit
Lines: 44
NNTP-Posting-Host: g036077.ppp.asahi-net.or.jp
X-Trace: 992506315 news3.asahi-net.or.jp 18688 211.132.36.77
X-Complaints-To: ap-net@asahi-net.or.jp