unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 040e0d6: Fix 'toggle-save-place'
Date: Thu, 25 Feb 2016 19:34:58 +0200	[thread overview]
Message-ID: <83bn74g0cd.fsf@gnu.org> (raw)
In-Reply-To: <jwvh9gwg2hy.fsf-monnier+emacsdiffs@gnu.org> (message from Stefan Monnier on Thu, 25 Feb 2016 12:05:06 -0500)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Thu, 25 Feb 2016 12:05:06 -0500
> 
> > It makes no sense not to autoload it, because then there's no way for
> > users to turn save-place in a single buffer.  Previously, users needed
> > to load saveplace.el to have the feature, so an autoload was not
> > needed.
> 
> But that still works "as well as before"
> (i.e. as long as they (require 'saveplace)).

Except that I just told them in NEWS not to...

> > I have nothing against having a local mode, but I don't have time to
> > work on this now, so patches are very welcome.
> 
> I think I have something better, but I think some of the changes are too
> late for 25.1, so I suggest we install the patch below (which against
> forces users to use (require 'saveplace) before calling
> toggle-save-place, like before: it's not ideal, but it's not
> a regression).

Fine with me, thanks.

> -;;;###autoload

I'd like to keep the autoload, otherwise there's an asymmetry: the
global mode is autoloaded, the local one isn't.

>  (defun toggle-save-place (&optional parg) ;FIXME: save-place-local-mode!
>    "Toggle whether to save your place in this file between sessions.
>  If this mode is enabled, point is recorded when you kill the buffer
> @@ -167,17 +166,21 @@ toggle-save-place
>                           (> (prefix-numeric-value parg) 0)
>                         (not save-place)))
>      (cond
> -     (save-place
> +     (save-place-mode

Shouldn't we also replace save-place above this fragment?

> +      ;; FIXME: We should remove the hooks, but only in case this was the last
> +      ;; buffer using save-place-local-mode.  Is it worth the trouble, tho?

No, I don't think it's worth the trouble.  Chances are, the user will
promptly enable the mode in some other buffer.




  reply	other threads:[~2016-02-25 17:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160224205710.26753.62720@vcs.savannah.gnu.org>
     [not found] ` <E1aYgUg-0006y7-3M@vcs.savannah.gnu.org>
2016-02-25 13:44   ` [Emacs-diffs] emacs-25 040e0d6: Fix 'toggle-save-place' Stefan Monnier
2016-02-25 16:09     ` Eli Zaretskii
2016-02-25 17:05       ` Stefan Monnier
2016-02-25 17:34         ` Eli Zaretskii [this message]
2016-02-25 17:57           ` Stefan Monnier
2016-02-25 18:13             ` Eli Zaretskii
2016-02-25 13:51   ` Stefan Monnier
2016-02-25 13:56     ` Stefan Monnier
2016-02-25 16:10       ` Eli Zaretskii
2016-02-25 16:10     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bn74g0cd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).