From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.devel,gmane.emacs.xemacs.beta Subject: Re: simplifying beginning-of-defun Date: Tue, 29 Sep 2009 08:53:34 +0200 Message-ID: <4AC1AEEE.4070901@online.de> References: <4ABE54F9.7090107@online.de> <4ABF1DED.6050906@online.de> <4AC05C9A.2010802@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1254207323 24622 80.91.229.12 (29 Sep 2009 06:55:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Sep 2009 06:55:23 +0000 (UTC) Cc: XEmacs-Beta@xemacs.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 29 08:55:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MsWcC-0007yv-AG for ged-emacs-devel@m.gmane.org; Tue, 29 Sep 2009 08:55:12 +0200 Original-Received: from localhost ([127.0.0.1]:56924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsWcB-0005Hz-TN for ged-emacs-devel@m.gmane.org; Tue, 29 Sep 2009 02:55:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsWc6-0005Es-J2 for emacs-devel@gnu.org; Tue, 29 Sep 2009 02:55:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsWc3-0005AC-2s for emacs-devel@gnu.org; Tue, 29 Sep 2009 02:55:06 -0400 Original-Received: from [199.232.76.173] (port=52631 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsWc2-0005A7-GY for emacs-devel@gnu.org; Tue, 29 Sep 2009 02:55:02 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:3122) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MsWc2-0002f7-23 for emacs-devel@gnu.org; Tue, 29 Sep 2009 02:55:02 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.8]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsWbz-0001NN-PI for emacs-devel@gnu.org; Tue, 29 Sep 2009 02:55:00 -0400 Original-Received: from [192.168.178.27] (p54BE9603.dip0.t-ipconnect.de [84.190.150.3]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MOkOU-1MyaLQ3E3y-006OX4; Tue, 29 Sep 2009 08:54:47 +0200 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: X-Provags-ID: V01U2FsdGVkX1/9Ku1dlhYCSFEloh8DUkMZQgdLPX1inPMJru+ ikQmOO3i27uMFGlHk0OVXuzQIrbse24CWzxBHGa2reNiHyCPMQ F8V79t0917abHTvpYnCxdTWhf/szWDQ X-detected-operating-system: by mx20.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115776 gmane.emacs.xemacs.beta:30618 Archived-At: Stefan Monnier wrote: >>> I was pointing out incompatibilities. >> Can't see any. If you write >>>>> Apparently it makes beginning-of-defun-raw ignore >>>>> beginning-of-defun-function, >> it should do exactly that IMHO. > > Maybe it should, maybe it shouuldn't. My point is that it currently > does whereas in your patch it doesn't, so that's an incompatibility. > That doesn't mean it's a problem, just a place that requires > careful attention. Just did range things differently - and weeded out a little bit. Maybe lets rest the issue for now. Should a bug report hit the matter. I'll point you to it again. > >> Why not let modes say what they want and need? An argument must not mean a >> repeat BTW. In python-mode is a selection to deliver too. > > end-of-defun's docstring says "With argument, do it that many times", so > if a major mode uses it for other purposes, it's abusing it. This docstring now belongs to the -raw function. (Or -intern, as I will call it.) Thanks for the hint. It would > probably be better in such a case to just define a new command and remap > keys to that new command. > No need for such things. Everything should work as before, but some bugs shall be gone. (Beside the GNU-push-mark case, but didn't encounter any broken function from it for now) >>>> Mentioned code of a end-of-defun-function in lisp.el is a bug. >>>> Suggest to cancel it. >>> I do not know which code nor which bug you talking about. Your code? >>> Emacs's code? >> from GNU lisp.el. > >> "(defvar end-of-defun-function >> (lambda () ...." > >> Giving it a value here, it will be called. Which is >> to avoid, as only languages-modes should set and use it. > > Who says? > >> This setting reintroduces all the mess, >> beginning/end-of-defun-function are invented for. > > I do not know what you're referring to. > >>>> Funcalls of beginning-of-defun-function, end-of-defun-function should >>>> be reserved for progmodes. >>> I have no idea what you mean by "progmodes". >> Modes of other programming languages than emacs-lisp > > Why would such a concept matter here? emacs-lisp-mode should not be > treated specially. Why not? Its a special mode and deserves its attention. > >>>> BTW if mode-specific, probably it should be introduced as a local var >>>> from the very beginning? >>> I'm not sure I understand. Are you suggesting we >>> (make-varible-buffer-local 'beginning-of-defun-function)? >> Yes, that's the question. I.e it should be mode-specific, in any case >> not global. > > It's definitely meant to be buffer-local. That doesn't mean there > shouldn't be a meaningful default for those buffers which don't want to > bother to set it themselves. Ok. So I introduce these forms still: (make-variable-buffer-local 'beginning-of-defun-function) (make-variable-buffer-local 'end-of-defun-function) Thanks again Andreas > > > Stefan > > >