From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: daniel@bigwalter.net (Daniel Jensen) Newsgroups: gmane.emacs.help Subject: Re: hook into change of position? Date: Mon, 11 Jun 2007 15:38:57 +0200 Message-ID: <87fy4ya9vy.fsf@orme.bigwalter.net> References: <1181404055.751871.326110@w5g2000hsg.googlegroups.com> <87hcpgf0mp.fsf@orme.bigwalter.net> <1181518000.482785.323720@q75g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1181569240 22115 80.91.229.12 (11 Jun 2007 13:40:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2007 13:40:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 11 15:40:38 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 1Hxk8K-00077O-C1 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jun 2007 15:40:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hxk8J-0002zb-NM for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jun 2007 09:40:35 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-X-Trace: individual.net C+L0B5AfLJXAavSE4uMtnAeN0NgY+Qe6M+Nq5RCDr1V6KEkBn5 X-Face: SNGmwsN&0DaHhS0!*%\@y"Wc^).,<; VsqY#}K/NJ:A Z6_>Md7x$Z9C1%BAu41M'12-8(f2{H*8OsnYv,K+y.szl1K>}{uC/>2?; k[KUiD=$}@z>odk|7Tk7i $A|{j7LhTt!:SdVp5Z, kKA247}--"-QLedxCbw|#&bh=R]Rd)kx{q+T'fG)9ayG`+\@g'3vx1Fd3bl -`3}Guvr!A"Z);"$|]CXW>YR5m"<[L User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:Q322KKvvvNjxllKLy+MemGFkHtM= Original-Xref: shelby.stanford.edu gnu.emacs.help:149300 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:44888 Archived-At: troelskn writes: > Thanks. After some experiments, I ended up writing wrappers explicitly > for the functions, which I need to extend. I can't help feeling, that > there is some smarter way of accomplishing this, though. It's not necessarily bad; many modes define their own movement commands. You still haven't told exactly what you are doing, so I cannot tell. > (defun my-end-of-line (&optional arg) > "" > (interactive "p") > (setq mark-active nil) > (end-of-line arg) > (my-hook-function)) Maybe this was only example code, but I'll point out anyway that it's in bad style. Use descriptive names and write a documentation string, so that one can at least guess what the function does. > I'm not even sure, that the (optional) argument `arg` will be passed > on correctly to the wrapped function `end-of-line` What makes you think that? Did you try it?