From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#553: 23.0.60; Unknown button type `quail-keyboard-layout-button' Date: Tue, 26 Aug 2008 17:11:44 -0400 Message-ID: <87prnvscq7.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 553@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1219786100 16340 80.91.229.12 (26 Aug 2008 21:28:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2008 21:28:20 +0000 (UTC) Cc: 553@emacsbugs.donarmstrong.com, Kenichi Handa To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 26 23:29:13 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KY666-00008u-PZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Aug 2008 23:29:07 +0200 Original-Received: from localhost ([127.0.0.1]:51468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY658-0002Dc-KM for geb-bug-gnu-emacs@m.gmane.org; Tue, 26 Aug 2008 17:28:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KY64b-0001dF-Hf for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2008 17:27:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KY64a-0001bi-0N for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2008 17:27:33 -0400 Original-Received: from [199.232.76.173] (port=32961 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KY64Z-0001bT-Lp for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2008 17:27:31 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34041) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KY64Z-0002n5-7u for bug-gnu-emacs@gnu.org; Tue, 26 Aug 2008 17:27:31 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7QLRSiX013890; Tue, 26 Aug 2008 14:27:29 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7QLF4gk009494; Tue, 26 Aug 2008 14:15:04 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 26 Aug 2008 21:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 553 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 553-submit@emacsbugs.donarmstrong.com id=B553.12197850047844 (code B ref 553); Tue, 26 Aug 2008 21:15:03 +0000 Original-Received: (at 553) by emacsbugs.donarmstrong.com; 26 Aug 2008 21:10:04 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7QL9xbx007798 for <553@emacsbugs.donarmstrong.com>; Tue, 26 Aug 2008 14:10:00 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 2FF5B57E34B; Tue, 26 Aug 2008 17:11:44 -0400 (EDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Tue, 26 Aug 2008 17:27:33 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19736 Archived-At: > > Do you remember why you wrote quail-help-init this way? It seems > > unnecessary; why not define the button types directly at the top level > > of quail.el? > > I don't know the reason of writing quail-help-init this way, but it seems > it was to not load `help-mode' after loading `quail.el'. `help-mode' is > not necessary for quail's operations, so its loading should be postponed > for rare cases when the user needs to see the help buffer with keyboard > layouts. Right, but why do we have to put the button definitions inside quail-help-init? In other words, why not the following? *** trunk/lisp/international/quail.el.~1.164.~ 2008-05-06 00:18:15.000000000 -0400 --- trunk/lisp/international/quail.el 2008-08-26 17:09:39.000000000 -0400 *************** *** 2424,2450 **** (insert ?\n)) (insert ?\n)))) ! (defun quail-help-init () ! (unless (featurep 'help-mode) ! (require 'help-mode) ! (define-button-type 'quail-keyboard-layout-button ! :supertype 'help-xref ! 'help-function '(lambda (layout) ! (help-setup-xref `(quail-keyboard-layout-button ,layout) ! nil) ! (quail-show-keyboard-layout layout)) ! 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) ! ! (define-button-type 'quail-keyboard-customize-button ! :supertype 'help-customize-variable ! 'help-echo (purecopy "mouse-2, RET: customize keyboard layout")))) (defun quail-help (&optional package) "Show brief description of the current Quail package. Optional arg PACKAGE specifies the name of alternative Quail package to describe." (interactive) ! (quail-help-init) (let ((help-xref-mule-regexp help-xref-mule-regexp-template) (mb enable-multibyte-characters) (package-def --- 2424,2447 ---- (insert ?\n)) (insert ?\n)))) ! (define-button-type 'quail-keyboard-layout-button ! :supertype 'help-xref ! 'help-function '(lambda (layout) ! (help-setup-xref `(quail-keyboard-layout-button ,layout) ! nil) ! (quail-show-keyboard-layout layout)) ! 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) ! ! (define-button-type 'quail-keyboard-customize-button ! :supertype 'help-customize-variable ! 'help-echo (purecopy "mouse-2, RET: customize keyboard layout")) (defun quail-help (&optional package) "Show brief description of the current Quail package. Optional arg PACKAGE specifies the name of alternative Quail package to describe." (interactive) ! (require 'help-mode) (let ((help-xref-mule-regexp help-xref-mule-regexp-template) (mb enable-multibyte-characters) (package-def