unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "T. V. Raman" <raman@users.sf.net>
To: lennart.borgman@gmail.com
Cc: emacs-devel@gnu.org
Subject: Add a function to test for invisible characters?
Date: Tue, 24 Jun 2008 06:39:37 -0700	[thread overview]
Message-ID: <18528.63769.312834.741365@gargle.gargle.HOWL> (raw)
In-Reply-To: <485FC25F.4090407@gmail.com>

I'd definitely find this useful in the emacspeak layer. I've
defined it myself in the emacspeak codebase in the past, and have
gotten it wrong  at times as well

>>>>> "Lennart" == Lennart Borgman (gmail) <lennart.borgman@gmail.com> writes:
    Lennart> I asked some time ago if a function to test if a
    Lennart> character is invisible.  I think nothing has been
    Lennart> done to this, or am I mistaken?
    Lennart> 
    Lennart> I think some code in Emacs currently gets this
    Lennart> wrong. Do for example reveal get this right?
    Lennart> 
    Lennart> Below is such a function that I use and that I think
    Lennart> follow the specifications for this. Should not
    Lennart> something like this be in Emacs?
    Lennart> 
    Lennart> (defun tabkey2-invisible-p (pos) "Return non-nil if
    Lennart> the character after POS is currently invisible."
    Lennart> (let ((prop (get-char-property pos 'invisible))) (if
    Lennart> (eq buffer-invisibility-spec t) prop (if (listp
    Lennart> prop) (catch 'invis (dolist (p prop) (when (or (memq
    Lennart> p buffer-invisibility-spec) (assq p
    Lennart> buffer-invisibility-spec)) (throw 'invis t)))) (or
    Lennart> (memq prop buffer-invisibility-spec) (assq prop
    Lennart> buffer-invisibility-spec))))))
    Lennart> 

-- 
Best Regards,
--raman

      
Email:  raman@users.sf.net
WWW:    http://emacspeak.sf.net/raman/
AIM:    emacspeak       GTalk: tv.raman.tv@gmail.com
PGP:    http://emacspeak.sf.net/raman/raman-almaden.asc
Google: tv+raman 
IRC:    irc://irc.freenode.net/#emacs




      parent reply	other threads:[~2008-06-24 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23 15:33 Add a function to test for invisible characters? Lennart Borgman (gmail)
2008-06-23 18:50 ` 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 [this message]

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=18528.63769.312834.741365@gargle.gargle.HOWL \
    --to=raman@users.sf.net \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    /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).