unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Add a function to test for invisible characters?
Date: Mon, 23 Jun 2008 17:33:51 +0200	[thread overview]
Message-ID: <485FC25F.4090407@gmail.com> (raw)

I asked some time ago if a function to test if a character is invisible. 
I think nothing has been done to this, or am I mistaken?

I think some code in Emacs currently gets this wrong. Do for example 
reveal get this right?

Below is such a function that I use and that I think follow the 
specifications for this. Should not something like this be in Emacs?

(defun tabkey2-invisible-p (pos)
   "Return non-nil if the character after POS is currently invisible."
   (let ((prop (get-char-property pos 'invisible)))
     (if (eq buffer-invisibility-spec t)
         prop
       (if (listp prop)
           (catch 'invis
             (dolist (p prop)
               (when (or (memq p buffer-invisibility-spec)
                         (assq p buffer-invisibility-spec))
                 (throw 'invis t))))
         (or (memq prop buffer-invisibility-spec)
             (assq prop buffer-invisibility-spec))))))




             reply	other threads:[~2008-06-23 15:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23 15:33 Lennart Borgman (gmail) [this message]
2008-06-23 18:50 ` Add a function to test for invisible characters? Stefan Monnier
2008-06-23 18:54   ` Lennart Borgman (gmail)
2008-06-23 19:34     ` Lennart Borgman (gmail)
2008-06-23 20:21       ` ken manheimer
2008-06-24 13:39 ` T. V. Raman

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=485FC25F.4090407@gmail.com \
    --to=lennart.borgman@gmail.com \
    --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).