all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: How to distinguish character from noncharacter input events?
Date: Wed, 11 Aug 2004 17:53:17 -0600	[thread overview]
Message-ID: <411AB16D.1010600@yahoo.com> (raw)
In-Reply-To: wkvffpz5qh.fsf@TheWorld.com

Joe Fineman wrote:
 > Stefan Monnier <monnier@iro.umontreal.ca> writes:
 >>What's your definition of a "character event"?
 >
 > As a practical matter, it means an event that will not give the error
 > message "non-character input event" when read-char encounters it.

You could implement the same check as read-char:

(defun character-event-p (event)
   "Return non-nil if EVENT is a character event."
   ;; see Fread_char:
   (if (symbolp event)
       (let* ((mask (get event 'event-symbol-element-mask))
              (char (if mask
                        (get (car mask) 'ascii-character))))
         (if char
             (setq event (logior char (car (cdr mask)))))))
   (integerp event))

-- 
Kevin Rodgers

  reply	other threads:[~2004-08-11 23:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10 14:03 How to distinguish character from noncharacter input events? Joe Fineman
2004-08-10 15:32 ` Stefan Monnier
2004-08-11 22:09   ` Joe Fineman
2004-08-11 23:53     ` Kevin Rodgers [this message]
2004-08-12 12:05     ` Kai Grossjohann
2004-08-11  3:25 ` Joakim Hove
2004-08-11 18:24   ` Ehud Karni

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

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

  git send-email \
    --in-reply-to=411AB16D.1010600@yahoo.com \
    --to=ihs_4664@yahoo.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 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.