From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Don't move to eol in end-of-defun? Date: Sun, 07 Aug 2022 00:24:04 -0400 Message-ID: References: Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="900"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fgunbin@fastmail.fm, emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 07 06:27:35 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKXt0-000AcI-TG for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 06:27:35 +0200 Original-Received: from localhost ([::1]:56320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKXsz-0007x1-Dt for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 00:27:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKXpd-0005sT-2s for emacs-devel@gnu.org; Sun, 07 Aug 2022 00:24:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKXpc-0007zw-Ed; Sun, 07 Aug 2022 00:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=pox3B0o9l9bXuxK09AKJxF6Pq/beV+o4fSkrkH4cIlA=; b=I6QkTAGn9FAn bKLx4fzF9RCvwJfK+FQeNkDHbhJA7BIyPYefbNEZeM/hDVXZm5jw+kOrooIa3T5T3J4tCBtSq2lEe SCfVegVQ3xTrprW/7u/DEtJKjjT3Er8YB+08Wgu3/Mtscqid7B41NXEzHMXepxK9NcCMD2P+e30BT TNydOQfJeZrtn64M7DsRbwwppQXOTI+WfX19TkaL6CxzLRRnz49vT5cME4MeXjJY+zbQldg0ap+V2 X/N1oYd7TqdSiNlbQWunDSIOjYiuU+r9lqbnR4aCnIVRLvv5cYqR6uZGGNRbE1aI8k4cCnWf1A0SW cCTF6rOLFCXzCk2uVhU+Ow==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1oKXpc-0007IB-3m; Sun, 07 Aug 2022 00:24:04 -0400 In-Reply-To: (message from Alan Mackenzie on Sat, 6 Aug 2022 09:33:39 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293168 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > The problem is that e-o-d moves point somewhere else _before_ it calls > end-of-defun-function, and that somewhere else can easily be in a > different (nested) defun. Is there a case which is incorrect _now_? If so, what case is it, and what happens now in that case? > I think Filipp is asking for the coding of end-of-defun to be revisited. Code can be changed if it is broken, but the question behind that needs to be, "What is the right thing in this case?" > In these circumstances, for C-M-a to go to the outermost "defun" > wouldn't be useful. Yes, we do need to be able to have outer groupings which we designate as "does not count as a defun", so that things inside it which look like defuns do count as defuns. This requires a way for the programmer to mark them so that C-M-a mostly ignores them. However, any old nested function definition shouldn't be treated as a defun. > CC Mode has C-M-a moving to the previous start of > defun at the current level of namespace/class/struct nesting, or the > next level outwards when we bump up against the defining > namespace/class/struct start. C-M-e works likewise. Can that method be used in this language too? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)