[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I tell when the current buffer is the minibuffer?
From: |
Johan Bockgård |
Subject: |
Re: How do I tell when the current buffer is the minibuffer? |
Date: |
Sun, 06 Mar 2016 21:15:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Alan Mackenzie <address@hidden> writes:
> How does one correctly create a buffer local variable in C? What I have
> at the moment is:
>
> DEFSYM (Qcomment_depth_hwm, "comment-depth-hwm");
> DEFVAR_LISP ("comment-depth-hwm", Vcomment_depth_hwm,
> doc: /* Buffer position below which the `comment-depth'
> property is valid. */);
> Vcomment_depth_hwm = make_number (1);
> Fmake_variable_buffer_local (Qcomment_depth_hwm);
>
> This is clearly inadequate, of itself, to create a buffer local variable.
Yes:
(make-variable-buffer-local VARIABLE)
Make VARIABLE become buffer-local whenever it is set.
(make-local-variable VARIABLE)
Make VARIABLE have a separate value in the current buffer.
(Or DEFVAR_PER_BUFFER, as you said.)
- Re: How do I tell when the current buffer is the minibuffer?, (continued)
- Re: How do I tell when the current buffer is the minibuffer?, raman, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Andreas Schwab, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Alan Mackenzie, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Andreas Schwab, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Alan Mackenzie, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Andreas Schwab, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Alan Mackenzie, 2016/03/05
- Re: How do I tell when the current buffer is the minibuffer?, Eli Zaretskii, 2016/03/06
- Re: How do I tell when the current buffer is the minibuffer?, Alan Mackenzie, 2016/03/06
- Re: How do I tell when the current buffer is the minibuffer?, Stefan Monnier, 2016/03/08
- Re: How do I tell when the current buffer is the minibuffer?,
Johan Bockgård <=