From: David Kastrup <dak@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: David Reitter <david.reitter@gmail.com>,
Emacs-Devel <emacs-devel@gnu.org>, Miles Bader <miles@gnu.org>
Subject: Re: face-remapping patch
Date: Wed, 28 May 2008 22:31:46 +0200 [thread overview]
Message-ID: <85ej7mi30t.fsf@lola.goethe.zz> (raw)
In-Reply-To: <85lk1ui3i0.fsf@lola.goethe.zz> (David Kastrup's message of "Wed, 28 May 2008 22:21:27 +0200")
Sorry, C-c C-c is just too close to C-x C-x. This posting was not
finished.
David Kastrup <dak@gnu.org> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> Miles, could you clarify why you are proposing a remapping list rather than
>>> "buffer-local faces"?
>>
>> I think adding "buffer-local faces" directly is no better. The good
>> thing about Miles's patch is that it leverages buffer-local variables to
>> modify faces buffer-locally. As a result, his patch is pretty small.
>>
>> To improve on this, I think we'd have to move to something more like
>> XEmacs's specifiers. But I haven't even seen any proposal for such
>> a thing yet.
>
> Proposal: allow a third argument for make-local-variable.
>
> (make-local-variable VARIABLE &optional locus)
>
> Make VARIABLE have a separate value in the given locus (defaulting to
> the current buffer).
>
> A locus can be a buffer, a frame, a terminal, a window. When there is
> more than one locus for which a variable may be local, the value is used
> from the first locus in the list window - buffer - frame - terminal.
>
> (local-variable-p VARIABLE &optional LOCUS)
>
> Non-nil if VARIABLE has a local binding in locus LOCUS (see make-variable).
> BUFFER defaults to the current buffer.
>
> variable-binding-locus is a built-in function in `C source code'.
>
> (variable-binding-locus VARIABLE)
>
> Return a value indicating where VARIABLE's current binding comes from.
> If the current binding is buffer-local, the value is the current buffer.
> If the current binding is frame-local, the value is the selected frame.
> If the current binding is global (the default), the value is nil.
That one actually already exists.
For the following, s/buffer/locus/g:
buffer-local-value is a built-in function in `C source code'.
(buffer-local-value VARIABLE BUFFER)
Return the value of VARIABLE in BUFFER.
If VARIABLE does not have a buffer-local binding in BUFFER, the value
is the default binding of the variable.
Bing. A simple API, easy to understand, easy to use. And
_transparent_.
Now XEmacs specifiers offer something more: you can specify local values
for _classes_ of display, like B&W, or reduced color or so. We have
something like that for faces.
However, I don't think the price for the generality of specifiers is
worth the complexity in the particular implementation and documentation
state of XEmacs. I did not understand them after trying for a
considerable amount of time, and I am arrogant enough to consider
something which I feel unable to understand as being off the complexity
bell curve for reliable engineering.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2008-05-28 20:31 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 2:49 face-remapping patch Miles Bader
2008-05-28 2:03 ` Florian Beck
2008-05-28 2:31 ` Miles Bader
2008-05-29 1:38 ` Richard M Stallman
2008-05-28 2:54 ` Stefan Monnier
2008-05-28 3:30 ` Miles Bader
2008-05-28 7:22 ` David Reitter
2008-05-28 7:29 ` Miles Bader
2008-05-28 8:05 ` Miles Bader
2008-05-28 9:30 ` David Kastrup
2008-05-28 13:13 ` Miles Bader
2008-05-28 13:33 ` David Kastrup
2008-05-28 9:33 ` David Reitter
2008-05-28 13:21 ` Miles Bader
2008-05-28 14:33 ` David Reitter
2008-05-28 19:25 ` Face realization (was: face-remapping patch) Stefan Monnier
2008-05-28 19:54 ` David Reitter
2008-05-29 15:25 ` Face realization Stefan Monnier
2008-05-28 19:25 ` face-remapping patch Stefan Monnier
2008-05-28 20:21 ` David Kastrup
2008-05-28 20:31 ` David Kastrup [this message]
2008-05-29 6:02 ` tomas
2008-05-29 18:14 ` Stephen J. Turnbull
2008-05-29 22:15 ` David Kastrup
2008-05-30 4:48 ` Stephen J. Turnbull
2008-05-30 13:32 ` Richard M Stallman
2008-05-30 13:50 ` David Kastrup
2008-05-31 15:17 ` Richard M Stallman
2008-05-31 15:38 ` David Kastrup
2008-06-01 14:03 ` Richard M Stallman
2008-05-29 10:25 ` Richard M Stallman
2008-05-29 11:14 ` David Kastrup
2008-05-29 15:45 ` Specifiers (was: face-remapping patch) Stefan Monnier
2008-05-29 16:21 ` Specifiers David Kastrup
2008-05-29 17:36 ` Specifiers Stefan Monnier
2008-05-29 18:17 ` Specifiers Stephen J. Turnbull
2008-05-30 2:08 ` Specifiers (was: face-remapping patch) Richard M Stallman
2008-05-30 2:21 ` Specifiers Stefan Monnier
2008-05-30 5:31 ` Specifiers David Kastrup
2008-05-30 14:10 ` Specifiers Stefan Monnier
2008-05-30 14:14 ` Specifiers David Kastrup
2008-05-30 15:11 ` Specifiers Stefan Monnier
2008-05-31 15:16 ` Specifiers Richard M Stallman
2008-05-29 15:56 ` face-remapping patch Stefan Monnier
2008-05-29 16:27 ` David Kastrup
2008-05-29 8:47 ` Miles Bader
2008-05-29 15:59 ` Stefan Monnier
2008-05-29 18:28 ` Eli Zaretskii
2008-05-30 3:42 ` Miles Bader
2008-05-28 14:46 ` Chong Yidong
2008-05-28 14:57 ` David Reitter
2008-05-28 16:33 ` Miles Bader
2008-05-30 15:10 ` Chong Yidong
2008-06-01 2:43 ` Miles Bader
2008-05-28 16:37 ` Dan Nicolaescu
2008-05-28 17:45 ` Miles Bader
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=85ej7mi30t.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=david.reitter@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.