[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: major mode in new buffers
From: |
Juanma Barranquero |
Subject: |
Re: major mode in new buffers |
Date: |
Thu, 1 Apr 2010 23:08:24 +0200 |
2010/4/1 Juri Linkov <address@hidden>:
> I know nothing about ehelp.el, but it seems this patch fixes it:
Yes, thanks. Please install it. Two small comments:
> +(defvar electric-help-orig-major-mode nil)
> +
> (defun electric-help-mode ()
> "`with-electric-help' temporarily places its buffer in this mode.
> -\(On exit from `with-electric-help', the buffer is put in default
> `major-mode'.)"
> +\(On exit from `with-electric-help', the original `major-mode' is restored.)"
> (setq buffer-read-only t)
> + (set (make-local-variable 'electric-help-orig-major-mode) major-mode)
It makes sense for `electric-help-orig-major-mode' to be automatically
buffer-local, as it will ever be used as such.
> ;; call to help-mode won't cut it; at least RET is bound wrong
> ;; afterwards. It's also not clear that `help-mode' is always
> ;; the right thing, maybe we should add an optional parameter.
This part of the comment (and the missing first line that precedes it)
is no longer true and should be deleted.
Juanma
- Re: major mode in new buffers, Juri Linkov, 2010/04/01
- Re: major mode in new buffers,
Juanma Barranquero <=
- Re: major mode in new buffers, Juanma Barranquero, 2010/04/01
- Re: major mode in new buffers, Juri Linkov, 2010/04/01
- Re: major mode in new buffers, Juanma Barranquero, 2010/04/01
- Re: major mode in new buffers, Juri Linkov, 2010/04/02
- Re: major mode in new buffers, Juanma Barranquero, 2010/04/02
- Re: major mode in new buffers, Juri Linkov, 2010/04/02