all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
To: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Signaling text-read-only
Date: Tue, 15 Feb 2011 04:35:12 +0100	[thread overview]
Message-ID: <AANLkTikZ8+wPHuFfXBT1NfGAQoR0ouZzAFBpaNjDNQNi@mail.gmail.com> (raw)

I have a situation here where I need to tell the user that the part of
the buffer where point is located is read-only. This is what I am
thinking right now:

(unless (rcirc-looking-at-input)
  (error (error-message-string (list 'text-read-only)))

or:

(unless (rcirc-looking-at-input)
  (signal 'text-read-only nil)))

I haven't found any examples of this explicit sort of signaling in the
other Lisp files in Emacs, but I might have missed something.

The reason why I need this is that `rcirc-complete' shouldn't be
called in read-only areas of the buffer.

What is the right way to do this?

-- 
Deniz Dogan



             reply	other threads:[~2011-02-15  3:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15  3:35 Deniz Dogan [this message]
2011-02-15  4:52 ` Signaling text-read-only Leo
2011-02-15 10:38   ` Deniz Dogan
2011-03-22 11:56     ` Leo

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=AANLkTikZ8+wPHuFfXBT1NfGAQoR0ouZzAFBpaNjDNQNi@mail.gmail.com \
    --to=deniz.a.m.dogan@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 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.