From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Should we move 20.x related stuff out of NEWS ? Date: Sun, 25 Apr 2004 07:55:27 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87n0508vvc.fsf@mail.jurta.org> References: <87u0zcr98h.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082871632 14120 80.91.224.253 (25 Apr 2004 05:40:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Apr 2004 05:40:32 +0000 (UTC) Cc: Alan Mackenzie , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Apr 25 07:40:25 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BHcNN-0006rn-00 for ; Sun, 25 Apr 2004 07:40:25 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BHcNM-00022z-00 for ; Sun, 25 Apr 2004 07:40:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHcLH-0002Qo-KN for emacs-devel@quimby.gnus.org; Sun, 25 Apr 2004 01:38:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BHcL3-0002HQ-28 for emacs-devel@gnu.org; Sun, 25 Apr 2004 01:38:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BHcKV-00019M-CZ for emacs-devel@gnu.org; Sun, 25 Apr 2004 01:37:59 -0400 Original-Received: from [66.33.219.19] (helo=spoon.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BHcKU-00018f-Fq for emacs-devel@gnu.org; Sun, 25 Apr 2004 01:37:26 -0400 Original-Received: from mail.jurta.org (80-235-32-196-dsl.mus.estpak.ee [80.235.32.196]) by spoon.dreamhost.com (Postfix) with ESMTP id A7CE913D857; Sat, 24 Apr 2004 22:37:29 -0700 (PDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "23 Apr 2004 01:38:56 +0200") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22120 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22120 storm@cua.dk (Kim F. Storm) writes: > Juri Linkov writes: >> Alan Mackenzie writes: >> > On the other hand, I've often wondered whether C-M-a ought to set the >> > mark. I often do a C-u C- first. Maybe I should try advising >> > C-M-[ae] to set the mark. >> >> Setting the mark by C-M-a is very useful when the user uses it to jump >> to the function's beginning to see its arguments and wants to return >> back to the original place. However, the mark shouldn't be set when >> the user uses C-M-a to move the point between defuns. > > So it should only set the mark if the previous command was not C-M-a. Yes, it looks right. >> The highest level can be reached by giving a sufficiently large >> argument to the `outline-up-heading' function. > > C-u C-c C-u ? Usually, this is enough to reach the top level, but for reliability the numeric argument should be 1000 (the magic constant used in many places related to outline-mode). Anyhow, the following patches set the mark for C-M-a and C-M-e in programming modes, and for C-c C-u in outline mode. BTW, I think isearch should not set the mark at the beginning of the buffer. Often users move the point to the beginning to start the search from the top. It's too inconvenient to have this position in the mark ring to go back to the original position. And moreover, the beginning of the buffer can be reached very easily when needed without going through the mark ring. Index: lisp/emacs-lisp/lisp.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp.el,v retrieving revision 1.52 diff -u -r1.52 lisp.el --- lisp/emacs-lisp/lisp.el 14 Apr 2004 18:20:23 -0000 1.52 +++ lisp/emacs-lisp/lisp.el 25 Apr 2004 04:58:59 -0000 @@ -175,6 +175,8 @@ If variable `beginning-of-defun-function' is non-nil, its value is called as a function to find the defun's beginning." (interactive "p") + (and (eq this-command 'beginning-of-defun) + (or (eq last-command 'beginning-of-defun) (push-mark))) (and (beginning-of-defun-raw arg) (progn (beginning-of-line) t))) @@ -223,6 +225,8 @@ If variable `end-of-defun-function' is non-nil, its value is called as a function to find the defun's end." (interactive "p") + (and (eq this-command 'end-of-defun) + (or (eq last-command 'end-of-defun) (push-mark))) (if (or (null arg) (= arg 0)) (setq arg 1)) (if end-of-defun-function (if (> arg 0) Index: lisp/outline.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/outline.el,v retrieving revision 1.5 diff -u -r1.5 outline.el --- lisp/outline.el 21 Jan 2004 03:25:37 -0000 1.5 +++ lisp/outline.el 25 Apr 2004 05:03:02 -0000 @@ -884,6 +879,8 @@ With argument, move up ARG levels. If INVISIBLE-OK is non-nil, also consider invisible lines." (interactive "p") + (and (eq this-command 'outline-up-heading) + (or (eq last-command 'outline-up-heading) (push-mark))) (outline-back-to-heading invisible-ok) (let ((start-level (funcall outline-level))) (if (eq start-level 1) Index: lisp/isearch.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v retrieving revision 1.226 diff -u -r1.226 isearch.el --- lisp/isearch.el 4 Mar 2004 16:54:08 -0000 1.226 +++ lisp/isearch.el 25 Apr 2004 04:39:34 -0000 @@ -699,9 +700,9 @@ ;; Exiting the save-window-excursion clobbers window-start; restore it. (set-window-start (selected-window) found-start t)) - ;; If there was movement, mark the starting position. + ;; If there was movement, mark the starting position (except at bob). ;; Maybe should test difference between and set mark iff > threshold. - (if (/= (point) isearch-opoint) + (if (and (/= (point) isearch-opoint) (/= isearch-opoint (point-min))) (or (and transient-mark-mode mark-active) (progn (push-mark isearch-opoint t) -- Juri Linkov http://www.jurta.org/emacs/