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: citation separation in reftex Date: Wed, 21 Feb 2007 15:49:07 GMT Organization: Business Internet Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1172076035 20404 80.91.229.12 (21 Feb 2007 16:40:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Feb 2007 16:40:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 21 17:40:33 2007 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.50) id 1HJuW9-00040B-Fs for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Feb 2007 17:40:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJuW8-0006ed-V8 for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Feb 2007 11:40:32 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elk.ncren.net!newsflash.concordia.ca!News.Dal.Ca!ursa-nb00s0.nbnet.nb.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.8.1pl1 (Debian) Original-Lines: 42 Original-NNTP-Posting-Host: 142.177.120.120 Original-X-Complaints-To: abuse@aliant.net Original-X-Trace: ursa-nb00s0.nbnet.nb.ca 1172072947 142.177.120.120 (Wed, 21 Feb 2007 11:49:07 AST) Original-NNTP-Posting-Date: Wed, 21 Feb 2007 11:49:07 AST Original-Xref: shelby.stanford.edu gnu.emacs.help:145773 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:41377 Archived-At: On 2007-02-21, Kevin Rodgers wrote: > Tyler Smith wrote: >> On 2007-02-16, Kevin Rodgers wrote: >>> Tyler Smith wrote: >>>> I put the modified function in scratch and c-x c-e to run it, and now >>>> the function works as I want. How do I get the modifed code to run >>>> automatically? I tried putting it in .emacs but that doesn't work. >>> That indicates that the original function definition is loaded after >>> your .emacs file, probably because the reftex library isn't actually >>> loaded until some reftex command is used (i.e. autoloaded). >>> >>> You could either explicitly load reftex before you redefine the >>> function: >>> >>> (require 'reftex) >>> (defun reftex-do-citation ...) >>> >>> Or defer the function redefinition until after reftex has been loaded: >>> >>> (eval-after-load "reftex" '(defun reftex-do-citation ...)) >>> >> >> Neither of those seems to work :( I tried adding a hook as well, but >> that also didn't work: >> >> (add-hook 'reftex-mode-hook 'reftex-do-citation) > > Before you've redefined the function and the original has been loaded > (i.e. it's working, but not the way you want), where does `C-h f' say > it is defined? > I can't see reftex-do-citation with C-h f, as it's not interactive. reftex-citation is the function that calls it, and for that: reftex-citation is an interactive autoloaded Lisp function in `reftex-cite'. -- Regards, Tyler Smith