* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management.
[not found] <E1SluYA-0006Vd-1m@vcs.savannah.gnu.org>
@ 2012-07-03 15:35 ` Juanma Barranquero
2012-07-04 11:39 ` Dmitry Antipov
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2012-07-03 15:35 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Emacs developers
Before 108836, this worked:
(setq-default major-mode (lambda () ...))
(find-file ...)
Now it fails; major-mode gets assigned some bogus value.
This is what I was using, BTW:
(setq-default major-mode
(lambda ()
(if buffer-file-name
(fundamental-mode)
(let ((buffer-file-name (buffer-name)))
(set-auto-mode)))))
but just
(setq-default major-mode (lambda () (fundamental-mode)))
is enough to show the problem.
Setting major-mode to a lambda expression is undocumented, and the
workaround for my problem is just adding a defun, so this is not
exactly a bug report. But perhaps you'll want to check whether the
change has other subtle implications.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management.
2012-07-03 15:35 ` [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management Juanma Barranquero
@ 2012-07-04 11:39 ` Dmitry Antipov
2012-07-04 11:45 ` Juanma Barranquero
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Antipov @ 2012-07-04 11:39 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Emacs developers
On 07/03/2012 07:35 PM, Juanma Barranquero wrote:
> Before 108836, this worked:
>
> (setq-default major-mode (lambda () ...))
> (find-file ...)
>
> Now it fails; major-mode gets assigned some bogus value.
>
> This is what I was using, BTW:
>
> (setq-default major-mode
> (lambda ()
> (if buffer-file-name
> (fundamental-mode)
> (let ((buffer-file-name (buffer-name)))
> (set-auto-mode)))))
>
> but just
>
> (setq-default major-mode (lambda () (fundamental-mode)))
>
> is enough to show the problem.
I tried both 24.1 and trunk revision 108858, and both behaves identically:
1) Start a fresh instance
2) Staying in *scratch*, eval:
(setq-default major-mode (lambda () (fundamental-mode))) => (lambda (nil) (fundamental-mode))
3) M-x describe-variable, enter 'major mode' =>
major-mode is a variable defined in `C source code'.
Its value is lisp-interaction-mode
Original value was fundamental-mode
Local in buffer *scratch*; global value is
(lambda nil
(fundamental-mode))
[etc...]
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management.
2012-07-04 11:39 ` Dmitry Antipov
@ 2012-07-04 11:45 ` Juanma Barranquero
2012-07-04 15:51 ` Dmitry Antipov
0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2012-07-04 11:45 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Emacs developers
On Wed, Jul 4, 2012 at 1:39 PM, Dmitry Antipov <dmantipov@yandex.ru> wrote:
> I tried both 24.1 and trunk revision 108858, and both behaves identically:
>
> 1) Start a fresh instance
> 2) Staying in *scratch*, eval:
> (setq-default major-mode (lambda () (fundamental-mode))) => (lambda (nil)
> (fundamental-mode))
> 3) M-x describe-variable, enter 'major mode' =>
Try my recipe:
A one-line .emacs, with just
(setq-default major-mode (lambda () (fundamental-mode)))
then:
emacs
C-x C-f ~/.emacs <RET>
I get an error on trunk, no error on 24.1.
Juanma
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-04 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1SluYA-0006Vd-1m@vcs.savannah.gnu.org>
2012-07-03 15:35 ` [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management Juanma Barranquero
2012-07-04 11:39 ` Dmitry Antipov
2012-07-04 11:45 ` Juanma Barranquero
2012-07-04 15:51 ` Dmitry Antipov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.