unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Problems with move_it_in_display_line_to X when tabs exist.
Date: Sat, 02 Dec 2017 19:38:51 -0800	[thread overview]
Message-ID: <m2609oscok.wl%esq@lawlist.com> (raw)

The five faces were set up with the built-in defface macro.  I set the buffer-display-table with setq and the following variable:

(defvar +-buffer-display-table
  (let* (
      (display-table (make-display-table))
      (ff-char
        (cond
          ((eq system-type 'darwin)
            ?\U0001D4D5)
          ((eq system-type 'windows-nt)
            ?\u0046)))
      (glyph-form-feed (make-glyph-code ff-char '+-form-feed-face))
      (glyph-pilcrow (make-glyph-code ?\u00B6 '+-newline-face))
      (glyph-space (make-glyph-code ?\u00B7 '+-space-face))
      (glyph-tab (make-glyph-code ?\u00BB '+-tab-face))
      (glyph-tab-spacer (make-glyph-code ?\t '+-tab-spacer-face)))
    (aset display-table ?\n `[,glyph-pilcrow ?\n])
    (aset display-table ?\f `[,glyph-form-feed])
    (aset display-table ?\t `[,glyph-tab ,glyph-tab-spacer])
    (aset display-table ?\s `[,glyph-space])
    display-table)
  "The `buffer-display-table' that is used when `+-mode' is active.")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [12-02-2017 19:32:49] <03 Dec 2017 05:32:49 +0200>
FROM:  Eli Zaretskii <eliz@gnu.org>
> 
> > Date:  Sat, 02 Dec 2017 14:28:31 -0800
> > From:  Keith David Bershatsky <esq@lawlist.com>
> > Cc:  emacs-devel@gnu.org
> > 
> > Here are the four values.  It looks like it.current_x is where I expected it to be, but it.what is showing a character instead of a stretch.
> > 
> > (gdb) print it.what
> > $1 = IT_CHARACTER
> > 
> > (gdb) print it.char_to_display
> > $2 = 9
> > 
> > (gdb) print it.method
> > $3 = GET_FROM_DISPLAY_VECTOR
> > 
> > (gdb) print it.current_x
> > $4 = 44
> 
> Please show the Lisp code that you used to set up the display table.



             reply	other threads:[~2017-12-03  3:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-03  3:38 Keith David Bershatsky [this message]
2017-12-03 14:29 ` Problems with move_it_in_display_line_to X when tabs exist Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2018-01-23  7:38 Keith David Bershatsky
2018-01-21 20:32 Keith David Bershatsky
2018-01-16 17:53 Keith David Bershatsky
2018-01-16  4:41 Keith David Bershatsky
2018-01-16 17:00 ` Eli Zaretskii
2018-01-15  5:48 Keith David Bershatsky
2018-01-15 12:06 ` Eli Zaretskii
2017-12-06 16:24 Keith David Bershatsky
2017-12-04  8:03 Keith David Bershatsky
2017-12-04  3:01 Keith David Bershatsky
2017-12-04 16:26 ` Eli Zaretskii
2017-12-03 20:56 Keith David Bershatsky
2017-12-04 15:48 ` Eli Zaretskii
2017-12-02 22:28 Keith David Bershatsky
2017-12-03  3:32 ` Eli Zaretskii
2017-12-02 19:52 Keith David Bershatsky
2017-12-02 21:14 ` Eli Zaretskii
2017-11-30  4:29 Keith David Bershatsky
2017-11-29  6:12 Keith David Bershatsky
2017-11-29 18:04 ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2609oscok.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).