all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Add a function to test for invisible characters?
@ 2008-06-23 15:33 Lennart Borgman (gmail)
  2008-06-23 18:50 ` Stefan Monnier
  2008-06-24 13:39 ` T. V. Raman
  0 siblings, 2 replies; 6+ messages in thread
From: Lennart Borgman (gmail) @ 2008-06-23 15:33 UTC (permalink / raw)
  To: Emacs Devel

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))))))




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

end of thread, other threads:[~2008-06-24 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.