From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: Adding to a submenu under the HTML menu Date: Sat, 28 Jan 2006 06:03:40 -0500 Message-ID: <20060128060340.2e925987@dellap.mousecar.net> References: <20060122233614.6c6e895f@dellap.mousecar.net> <20060124193501.GE6260@free.fr> Reply-To: gebser@speakeasy.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1138488394 25186 80.91.229.2 (28 Jan 2006 22:46:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2006 22:46:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 28 23:46:32 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F2yps-0007LF-Qz for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Jan 2006 23:46:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F2y4k-0006hi-OZ for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Jan 2006 16:57:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F2wRD-0002Uy-DI for help-gnu-emacs@gnu.org; Sat, 28 Jan 2006 15:12:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F2wRA-0002TX-Lv for help-gnu-emacs@gnu.org; Sat, 28 Jan 2006 15:12:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F2wIj-0000yn-To for help-gnu-emacs@gnu.org; Sat, 28 Jan 2006 15:04:02 -0500 Original-Received: from [69.17.117.4] (helo=mail2.sea5.speakeasy.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F2nuL-0006ze-PF for help-gnu-emacs@gnu.org; Sat, 28 Jan 2006 06:06:18 -0500 Original-Received: (qmail 31472 invoked from network); 28 Jan 2006 11:03:55 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO dellap.mousecar.net) ([66.93.11.17]) (envelope-sender ) by mail2.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 28 Jan 2006 11:03:55 -0000 Original-To: help-gnu-emacs@gnu.org In-Reply-To: <20060124193501.GE6260@free.fr> X-Mailer: Sylpheed-Claws 1.0.3 (GTK+ 1.2.10; i686-suse-linux) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32883 Archived-At: On Tue, 24 Jan 2006 20:35:01 +0100 Fran=E7ois.Gannaz wrote: > Le dim 22 jan 23:36, ken a =E9crit : > >=20 > > I want to add some German characters to the "Insert Character > > Entities" submenu under the "HTML" menu. Yes, there's a lot of docs > > on customizing menus, but I can't figure out the current code so > > don't know which docs are applicable. Would anyone know how to add > > a few nice characters to that submenu? >=20 > I guess you're using html-helper-mode. >=20 > Quoting from html-helper-mode.el : > html-helper-add-tag (l) > "Add a new tag to html-helper-mode. > Builds a tempo-template for the tag and puts it into the > appropriate keymap if a key is requested. Format: > `(html-helper-add-tag '(type keybinding completion-tag menu-name > template doc)' > [...] >=20 > So you could try in a *scratch buffer* : > (html-helper-add-tag > '(entity "\C-c%" "ç" "C c=E9dille" ("ç"))) > (html-helper-rebuild-menu) > After evaluating, it should appear automatically in the HTML menu. Marvelous! Works perfect. Thanks very much, Fran=E7ois. >=20 > If its's OK, put it in your .emacs, for example in a > html-helper-load-hook. For more details and examples, have a look at > html-helper-mode.el. Makes sense.... I've done that before, but with only one function, like (add-hook 'html-helper-mode-hook 'turn-on-auto-fill) I found and adapted some code, but my block of several entries shows up in the menu multiple times-- more than enough times to make the submenu extend from the top of the screen to the bottom. (add-hook 'html-helper-mode-hook ; (function (quote (lambda () (html-helper-add-tag '(entity "\C-c%" "ç" "C c=E9dille" ("ç"))) (html-helper-add-tag '(entity "\C-cD" "‡" "double dagger (‡)" ("‡"))) (html-helper-add-tag '(entity "\C-cd" "†" "dagger (†)" ("†"))) (html-helper-add-tag ; Scharfes S '(entity "\C-cs" "ß" "eszett =DF (ß)" ("ß")))=20 (html-helper-add-tag '(entity "\C-cU" "Ü" "=DC (Ü)" ("Ü"))) (html-helper-add-tag '(entity "\C-cO" "Ö" "=D6 (Ö)" ("Ö"))) ; (html-helper-add-tag ; '(entity "\C-cI" "Ï" "=CF (Ï)" ("Ï"))) (html-helper-add-tag '(entity "\C-cE" "Ë" "=CB (Ë)" ("Ë"))) (html-helper-add-tag '(entity "\C-cA" "Ä" "=C4 (Ä)" ("Ä"))) =20 (html-helper-add-tag '(entity "\C-cu" "ü" "=FC (ü)" ("ü"))) (html-helper-add-tag '(entity "\C-co" "ö" "=F6 (ö)" ("ö"))) ; (html-helper-add-tag ; '(entity "\C-ci" "ï" "=EF (ï)" ("ï"))) (html-helper-add-tag '(entity "\C-ce" "ë" "=EB (ë)" ("ë"))) (html-helper-add-tag '(entity "\C-ca" "ä" "=E4 (ä)" ("ä"))) (html-helper-rebuild-menu)))) The problem, I'm fairly certain has to do with the placement of (html-helper-rebuild-menu) and I've tried putting it in different places, even within a separate "(add-hook 'html-helper-mode-hook 'html-helper-rebuild-menu)" but none gave satisfactory results. I could be missing some syntax-- perhaps some quoting?--, but I really have no idea what it might be. Thanks very much for any further help, ken > -- > Fran=E7ois Gannaz --=20 "This world ain't big enough for the both of us," said the big noema to the little noema.