all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#20434: 24.3.91.1; set-display-table-slot produces error only when byte-compiled
@ 2015-04-26 17:29 Stefan Guath
  2015-04-26 19:12 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Guath @ 2015-04-26 17:29 UTC (permalink / raw)
  To: 20434

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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#20434: 24.3.91.1; set-display-table-slot produces error only when byte-compiled
  2015-04-26 17:29 bug#20434: 24.3.91.1; set-display-table-slot produces error only when byte-compiled Stefan Guath
@ 2015-04-26 19:12 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2015-04-26 19:12 UTC (permalink / raw)
  To: Stefan Guath; +Cc: 20434

> From: Stefan Guath <stefan@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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-26 19:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 17:29 bug#20434: 24.3.91.1; set-display-table-slot produces error only when byte-compiled Stefan Guath
2015-04-26 19:12 ` Eli Zaretskii

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.