all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r108836: Cleanup basic buffer management.
Date: Wed, 04 Jul 2012 15:39:59 +0400	[thread overview]
Message-ID: <4FF42B8F.3050703@yandex.ru> (raw)
In-Reply-To: <CAAeL0SREVrPgbwK25Bs26tCK_1wm1MH=U1Lyu5eKK+PWXqaY_g@mail.gmail.com>

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



  reply	other threads:[~2012-07-04 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2012-07-04 11:45     ` Juanma Barranquero
2012-07-04 15:51       ` Dmitry Antipov

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

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

  git send-email \
    --in-reply-to=4FF42B8F.3050703@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /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 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.