emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: standard-diplay-table very broken


From: Kim F. Storm
Subject: Re: standard-diplay-table very broken
Date: Thu, 02 Dec 2004 10:21:23 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Henrik Enberg <address@hidden> writes:

> This bug report will be sent to the Free Software Foundation,
> not to your local site managers!
> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
>
> Your bug report will be posted to the address@hidden mailing list.
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
> the 2004-12-01 change to disp-table.el completly breaks several parts of
> Emacs, Gnus and Eshell among them.
>
> Doing:
>
>         (setq standard-display-table (make-display-table))
>
> fixes the problem and makes Emacs usable for me again.
>

You refer to the change below, which indeed looks broken,
as it assumes that (face-id 'glyph) is a fixed value, but
that is only true for a specific build of emacs.



Index: disp-table.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/disp-table.el,v
retrieving revision 1.52
retrieving revision 1.53
diff -c -r1.52 -r1.53
*** disp-table.el       19 Mar 2004 01:03:22 -0000      1.52
--- disp-table.el       1 Dec 2004 18:30:33 -0000       1.53
***************
*** 35,42 ****
    "Return a new, empty display table."
    (make-char-table 'display-table nil))
  
! (or standard-display-table
!     (setq standard-display-table (make-display-table)))
  
  ;;; Display-table slot names.  The property value says which slot.
  
--- 35,55 ----
    "Return a new, empty display table."
    (make-char-table 'display-table nil))
  
! ;;;###autoload (setq standard-display-table #^[t nil ... 11534428 11534430 
[11534382 11534382 11534382] nil])
! ;; This code generates the preceding table:
! ;; (let* ((face (lsh (face-id 'glyph) 19))
! ;;        (backslash (+ face ?\\))
! ;;        (dot (+ face ?.))
! ;;        (table (make-display-table))
! ;;        print-length)
! ;;   (set-char-table-extra-slot table 2 backslash)
! ;;   (aset table 2208 (vector backslash ?\ ))
! ;;   (aset table 2221 (vector backslash ?-))
! ;;
! ;;   (set-char-table-extra-slot table 3 (+ face ?^))
! ;;
! ;;   (set-char-table-extra-slot table 4 (vector dot dot dot))
! ;;   (print table))
  


It is better to add the code as autoload cookies like this:
(I don't understand the 2208 and 2221 entries -- what about
 a comment about those).

;;;###autoload (or standard-display-table
;;;###autoload (let* ((face (lsh (face-id 'glyph) 19))
;;;###autoload        (backslash (+ face ?\\))
;;;###autoload        (dot (+ face ?.))
;;;###autoload        (table (make-display-table))
;;;###autoload        print-length)
;;;###autoload   (set-char-table-extra-slot table 2 backslash)
;;;###autoload   (aset table 2208 (vector backslash ?\ ))
;;;###autoload   (aset table 2221 (vector backslash ?-))
;;;###autoload 
;;;###autoload   (set-char-table-extra-slot table 3 (+ face ?^))
;;;###autoload 
;;;###autoload   (set-char-table-extra-slot table 4 (vector dot dot dot))
;;;###autoload   (setq standard-display-table table)))
  


BTW, I looked at loadup.el, and I wonder why loaddefs is loaded
so early (e.g. before subr.el).

Code that is pre-loaded into the dumped emacs shouldn't depend
on anything that is autoloaded, so loading loaddefs.el last
seems logical to me.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]