From: Drew Adams <drew.adams@oracle.com>
To: Andreas Schwab <schwab@linux-m68k.org>,
John Wiegley <jwiegley@gmail.com>
Cc: "Jorgen Schäfer" <jorgen.schaefer@gmail.com>, 23098@debbugs.gnu.org
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Date: Sun, 27 Mar 2016 08:07:24 -0700 (PDT) [thread overview]
Message-ID: <d994a790-b704-47ef-8c40-c33eda845db0@default> (raw)
In-Reply-To: <m28u14z5bt.fsf@linux-m68k.org>
> > (add-to-list
> > 'erc-mode-hook
> > #'(lambda () (set (make-local-variable 'scroll-conservatively) 100)))
>
> You should use add-hook for hook variables.
Also (nits):
1. No need to use #' with lambdas (no advantage in a context that
expects a function).
2. It is generally a good idea to use a named function (not a
lambda) on a hook. For one thing, removing it is easier and
more robust (`remove-hook') - no worries about differences in
whitespace etc.
3. Emacs now has `setq-local': `(setq-local VAR VALUE)'. (I too
use `(set (make-local-variable VAR) VALUE)', but mainly because
I usually need code that works also for older Emacs versions.)
next prev parent reply other threads:[~2016-03-27 15:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 18:40 bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window Jorgen Schaefer
2016-03-23 19:18 ` Eli Zaretskii
2016-03-23 19:40 ` Jorgen Schäfer
2016-03-23 20:22 ` Eli Zaretskii
2016-03-24 8:12 ` Jorgen Schäfer
2016-03-24 15:47 ` Eli Zaretskii
2016-03-24 16:27 ` Jorgen Schäfer
2016-03-24 16:38 ` Eli Zaretskii
2016-03-26 23:27 ` John Wiegley
2016-03-27 8:35 ` Andreas Schwab
2016-03-27 15:07 ` Drew Adams [this message]
2016-03-28 13:10 ` Jorgen Schäfer
2016-03-28 17:28 ` Eli Zaretskii
2016-03-28 17:41 ` Jorgen Schäfer
2016-03-28 17:59 ` 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=d994a790-b704-47ef-8c40-c33eda845db0@default \
--to=drew.adams@oracle.com \
--cc=23098@debbugs.gnu.org \
--cc=jorgen.schaefer@gmail.com \
--cc=jwiegley@gmail.com \
--cc=schwab@linux-m68k.org \
/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).