From: Detlev Zundel <dzu@akk.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Dmitry Antipov <dmantipov@yandex.ru>, 18337@debbugs.gnu.org
Subject: bug#18337: 24.4.50; apropos fails on "scroll"
Date: Thu, 11 Sep 2014 10:42:12 +0200 [thread overview]
Message-ID: <m2sijyv997.fsf@deepthought.outer.space.org> (raw)
In-Reply-To: <m2bnr38mms.fsf@deepthought.outer.space.org> (Detlev Zundel's message of "Fri, 29 Aug 2014 15:13:15 +0200")
[-- Attachment #1: Type: text/plain, Size: 3344 bytes --]
Hi,
> Hi Stefan,
>
> [added Dmitry on CC as the changelog seems to make a connection to the
> problem at hand]
>
>>> (when (setq properties (symbol-plist 'vertical-scroll-bar))
>>> (setq doc (list (car properties)))
>>> (while (setq properties (cdr (cdr properties)))
>>> (setq doc (cons (car properties) doc)))
>>> (nreverse doc))
>>
>>> => (0 event-symbol-element-mask event-symbol-elements
>>> modifier-cache variable-documentation)
>>
>>> Applying 'symbol-name to that list then yields the error.
>>
>> Note that, while convention is to use a symbol for property names, that
>> is not the only valid choice. 0 is a valid property name (tho an odd
>> one, arguably).
>
> I think in this case it actually caught an error though.
>
>> So while this 0 should probably be changed the mapconcat code that burps
>> on it should probably be changed not to assume that only symbols will
>> be used as property names.
>
> Looking deeper, it turns out that the 0 results from this:
>
> buffer.c:5473
>
> DEFSYM (Qvertical_scroll_bar, "vertical-scroll-bar");
> Fput (Qvertical_scroll_bar, Qchoice, list4 (Qnil, Qt, Qleft, Qright));
> DEFSYM (Qhorizontal_scroll_bar, "horizontal-scroll-bar");
>
> DEFSYM (Qfraction, "fraction");
> Fput (Qfraction, Qrange, Fcons (make_float (0.0), make_float (1.0)));
>
> DEFSYM (Qoverwrite_mode, "overwrite-mode");
> Fput (Qoverwrite_mode, Qchoice,
> list3 (Qnil, intern ("overwrite-mode-textual"),
> intern ("overwrite-mode-binary")));
>
> As far as I can tell, it should thus really be 'choice. Actually both
> vertical-scroll-bar and overwrite-mode have the problem:
>
> (symbol-plist 'vertical-scroll-bar)
>
> => (0 (nil t left right) event-symbol-element-mask (vertical-scroll-bar 0) event-symbol-elements (vertical-scroll-bar) modifier-cache ((0 . vertical-scroll-bar)) variable-documentation 374228)
>
> (symbol-plist 'overwrite-mode)
>
> => (0 (nil overwrite-mode-textual overwrite-mode-binary) event-symbol-element-mask (overwrite-mode 0) event-symbol-elements (overwrite-mode) modifier-cache ((0 . overwrite-mode)) :minor-mode-function binary-overwrite-mode variable-documentation 370277)
>
> The changelog mentions this
>
> 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
>
> More precise control over values of some buffer-local variables.
> * keyboard.c (Qvertical_scroll_bar):
> * frame.c (Qleft, Qright): Move to ...
> * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
> * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
> (syms_of_buffer): DEFSYM all of the above, attach special properties.
> Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
> vertical-scroll-bar, scroll-up-aggressively
> and scroll-down-aggressively.
>
> Dmitry, do you know why the construct for choice fails?
The attached patch fixes the problem for me as the plist now looks like
this:
(symbol-plist 'vertical-scroll-bar)
=> (choice (nil t left right) event-symbol-element-mask (vertical-scroll-bar 0) event-symbol-elements (vertical-scroll-bar) modifier-cache ((0 . vertical-scroll-bar)) variable-documentation 374812)
Cheers
Detlev
--
The 82558 B-step and later generation devices do not maintain a link
in D3 if PME is disabled or if the device does not have power.
-- Intel documentation
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-src-buffer.c-syms_of_buffer-Add-forgotten-Qchoice-DE.patch --]
[-- Type: text/x-diff, Size: 1015 bytes --]
From 5294eb80883abc3fb06805f972693664b294079f Mon Sep 17 00:00:00 2001
From: Detlev Zundel <dzu@member.fsf.org>
Date: Thu, 11 Sep 2014 10:37:54 +0200
Subject: [PATCH] * src/buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM
---
src/ChangeLog | 4 ++++
src/buffer.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/ChangeLog b/src/ChangeLog
index e20072d..393fbe7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-11 Detlev Zundel <dzu@member.fsf.org>
+
+ * buffer.c (syms_of_buffer): Add forgotten Qchoice DEFSYM
+
2014-09-03 Martin Rudalics <rudalics@gmx.at>
* buffer.c (scroll-bar-height): Fix typo in doc-string.
diff --git a/src/buffer.c b/src/buffer.c
index 45e614f..dd1e205 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5386,6 +5386,7 @@ syms_of_buffer (void)
staticpro (&Qpermanent_local);
staticpro (&Qkill_buffer_hook);
+ DEFSYM (Qchoice, "choice");
DEFSYM (Qleft, "left");
DEFSYM (Qright, "right");
DEFSYM (Qrange, "range");
--
2.1.0
next prev parent reply other threads:[~2014-09-11 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 13:50 bug#18337: 24.4.50; apropos fails on "scroll" Detlev Zundel
2014-08-27 15:46 ` Drew Adams
2014-08-28 9:04 ` Detlev Zundel
2014-08-28 13:17 ` Stefan Monnier
2014-08-29 13:13 ` Detlev Zundel
2014-09-11 8:42 ` Detlev Zundel [this message]
2014-09-12 11:16 ` Dmitry Antipov
2014-09-12 12:33 ` Detlev Zundel
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=m2sijyv997.fsf@deepthought.outer.space.org \
--to=dzu@akk.org \
--cc=18337@debbugs.gnu.org \
--cc=dmantipov@yandex.ru \
--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.