From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: beginning-of-defun (again) Date: Thu, 29 Oct 2015 13:03:34 +0100 Message-ID: <87lhal990p.fsf@fencepost.gnu.org> References: <56320200.4050503@online.de> <87twp951ug.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1446121847 29311 80.91.229.3 (29 Oct 2015 12:30:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Oct 2015 12:30:47 +0000 (UTC) Cc: Andreas =?iso-8859-1?Q?R=F6hler?= , emacs-devel@gnu.org To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 29 13:30:41 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrmLj-0003sk-Kk for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 13:30:35 +0100 Original-Received: from localhost ([::1]:43806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmLi-0001cW-Vk for ged-emacs-devel@m.gmane.org; Thu, 29 Oct 2015 08:30:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmLd-0001c9-FX for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:30:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrmLc-0002eP-F2 for emacs-devel@gnu.org; Thu, 29 Oct 2015 08:30:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrmLY-0002dr-2J; Thu, 29 Oct 2015 08:30:24 -0400 Original-Received: from localhost ([127.0.0.1]:59883 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZrmLX-0001ni-DA; Thu, 29 Oct 2015 08:30:23 -0400 Original-Received: by lola (Postfix, from userid 1000) id 9B519DF96B; Thu, 29 Oct 2015 13:03:34 +0100 (CET) In-Reply-To: <87twp951ug.fsf@gmail.com> (Oleh Krehel's message of "Thu, 29 Oct 2015 12:52:07 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192883 Archived-At: Oleh Krehel writes: > Hi Andreas, > > Andreas R=F6hler writes: > >> maybe it's time to have a reasonable default-behavior of >> beginning-of-defun in Emacs Lisp. > > I think it works pretty well as is. > >> open-paren-in-column-0-is-defun-start > > It's a strange variable that doesn't seem to do anything. Huh? > The only relevant setting is 0 or non-zero (the default). Huh?!? The only relevant settings are nil and non-nil. > Setting it to 0 seems to do nothing. Maybe someone could explain what > it actually does. Speeds up syntax highlighting by giving it anchor points. If you encounter ( in a file, that counts as the start of some list even without looking whether it might be part of something like "This is a string and it continues (on the next line..." or (list (missing-indentation or something like that. >> A function resp. top-level-form starts if the beginning of a list is >> followed by a respective keyword. >> The list of keywords being customizable seems a plus :) > > There's no reason for a defun to not start on a newline. But there's a reason for non-defuns to start on a newline. > And there's nothing else that makes "(" be on a new line, except for > rare cases in docstrings, where it can be escaped. In Elisp perhaps, but that variable is equally valid in Scheme. And rewrapping a comment string might move a ( to the start of a line without auto-escaping it in the process. Though the frequency of this happening to me when editing Scheme files has decreased to a degree where I suspect Emacs to be actively avoiding it these days. > So it seems that the problem is already solved in a good way, without > having to customize anything. --=20 David Kastrup