GNU bug report logs - #20434
24.3.91.1; set-display-table-slot produces error only when byte-compiled

Previous Next

Package: emacs;

Reported by: Stefan Guath <stefan <at> automata.se>

Date: Sun, 26 Apr 2015 17:30:05 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20434 in the body.
You can then email your comments to 20434 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20434; Package emacs. (Sun, 26 Apr 2015 17:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Guath <stefan <at> automata.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 26 Apr 2015 17:30:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Guath <stefan <at> automata.se>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.91.1;
 set-display-table-slot produces error only when byte-compiled
Date: Sun, 26 Apr 2015 19:29:34 +0200
VERSION:
GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org

TO REPRODUCE BUG:
1) Create file "bug.el" with the following single expression:
    (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?\s 'vertical-border))
2) Byte compile this "bug.el" file (i.e. create the file "bug.elc").
3) Start Emacs with emacs -Q
4) M-x load-file bug.elc
5) This will produce the error "Wrong type argument: char-table-p, nil". The uncompiled "bug.el" version works fine though.

DETAILS
The purpose of the expression is to set the space character as the vertical window separator, in order to achieve a cleaner visual design.

STRANGE WORK-AROUND
A strange work-around is to repeat the third arg to set-display-table-slot as a dummy expression before the real expression, i.e. if the complete "bug.el" looks like:

    (make-glyph-code ?\s 'vertical-border) ;Dummy repeat that somehow prevents bug...
    (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?\s 'vertical-border)) ;Now this suddenly works!

Then it works in the byte-compiled version.



bug No longer marked as found in versions 24.3.91.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 26 Apr 2015 17:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20434; Package emacs. (Sun, 26 Apr 2015 19:14:01 GMT) Full text and rfc822 format available.

Message #10 received at 20434 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Guath <stefan <at> automata.se>
Cc: 20434 <at> debbugs.gnu.org
Subject: Re: bug#20434: 24.3.91.1;
 set-display-table-slot produces error only when byte-compiled
Date: Sun, 26 Apr 2015 22:12:59 +0300
> From: Stefan Guath <stefan <at> automata.se>
> Date: Sun, 26 Apr 2015 19:29:34 +0200
> 
> VERSION:
> GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org
> 
> TO REPRODUCE BUG:
> 1) Create file "bug.el" with the following single expression:
>     (set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?\s 'vertical-border))
> 2) Byte compile this "bug.el" file (i.e. create the file "bug.elc").
> 3) Start Emacs with emacs -Q
> 4) M-x load-file bug.elc
> 5) This will produce the error "Wrong type argument: char-table-p, nil".

That's expected: the default value of standard-display-table is nil.
You should use something like this instead:

  (or standard-display-table
      (setq standard-display-table (make-display-table)))

> The uncompiled "bug.el" version works fine though.

Probably because you load it into a session that already has
standard-display-table initialized to a non-nil value.




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 27 Apr 2015 17:08:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 20434 <at> debbugs.gnu.org and Stefan Guath <stefan <at> automata.se> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 27 Apr 2015 17:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 May 2015 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 111 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.