From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tyler Smith Newsgroups: gmane.emacs.help Subject: Re: Adding a sublist to a list on startup Date: Thu, 16 Dec 2010 08:52:08 -0500 Message-ID: <87mxo5akqf.fsf@guruji.demimonde> References: <87zks9o3bw.fsf@guruji.demimonde> <08AABBED9C6F4D2A9644BD0B620685CD@us.oracle.com> <87vd2xnyvf.fsf@guruji.demimonde> <97015EFD9EC74A7DA045CCE24E99D2BE@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1292507596 9543 80.91.229.12 (16 Dec 2010 13:53:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Dec 2010 13:53:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 16 14:53:06 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PTEGX-0002kA-IY for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 14:53:05 +0100 Original-Received: from localhost ([127.0.0.1]:53881 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTEGW-0000mR-Qq for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 08:53:04 -0500 Original-Received: from [140.186.70.92] (port=54399 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTEFv-0000ib-Fp for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 08:52:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTEFu-0004Oj-1G for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 08:52:27 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:52572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTEFt-00042r-Qc for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 08:52:25 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PTEFq-0002M6-VR for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 14:52:22 +0100 Original-Received: from 76.177.51.182 ([76.177.51.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Dec 2010 14:52:22 +0100 Original-Received: from tyler.smith by 76.177.51.182 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Dec 2010 14:52:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 76.177.51.182 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:QIIhwLn8bEkBPR3yExYgBOkfP0I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:77589 Archived-At: "Drew Adams" writes: >> No, sorry, there are two different lists getting modified there. The >> first three pushes add to LaTeX-item-list, which is an alist (thus the >> dots). This seems to work as expected. The second group of pushes adds >> to LaTeX-environment-list, which is a list of two-element lists (no >> dots). > > M-x debug-on-entry RET my-LaTeX-hook RET > > Then use `d' to step through the function. You can use `e' at any time to > evaluate something (e.g. `LaTeX-env-item'). That should show you what the > problem is. > Finally got round to trying this. I can use e to evaluate items, but d gives me an error at the top of the buffer: Debugger entered--Lisp error: (error "Cannot return from the debugger in an error") Which I take to mean there is some error in the hook? The full hook is pasted below. It looks correct to me, but maybe I've missed something? (defun my-LaTeX-hook () (TeX-PDF-mode) (auto-fill-mode) (face-remap-set-base 'default '(:family "Verdana" :height 140)) (setq TeX-command-default "PdfLatex") (push '("choices" . LaTeX-insert-choice) LaTeX-item-list) (push '("parts" . LaTeX-insert-part) LaTeX-item-list) (push '("questions" . LaTeX-insert-question) LaTeX-item-list) (push '("choices" LaTeX-env-item) LaTeX-environment-list) (push '("questions" LaTeX-env-item) LaTeX-environment-list) (push '("parts" LaTeX-env-item) LaTeX-environment-list)) Thanks, Tyler