unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: ishi soichi <soichi777@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: override comment-or-uncomment-region gives an error
Date: Thu, 30 May 2013 11:05:25 +0900	[thread overview]
Message-ID: <CAEjRLuRSmbeBUCTWjbpkNHqnRZ=GtZxyYWh6SiNOuVfCpbRGzg@mail.gmail.com> (raw)

I am trying to override the existing function,
comment-or-uncommnent-region like

(defun comment-or-uncomment-region ()
  (interactive)
  (cond ((equal major-mode 'web-mode)
 (web-mode-comment-or-uncomment))
(t
 (comment-or-uncomment-region))))

When using web-mode, the commenting function is different. So I need
something like this.

It works for web-mode case, but it raises an error for any other modes,

  cond: Lisp nesting exceeds `max-lisp-eval-depth'

Does anyone see why?

soichi


             reply	other threads:[~2013-05-30  2:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  2:05 ishi soichi [this message]
2013-05-30  2:47 ` override comment-or-uncomment-region gives an error Drew Adams
2013-05-30  3:21   ` ishi soichi
2013-05-30  5:54 ` Andreas Röhler
2013-05-30 14:50 ` Stefan Monnier
2013-06-04  3:04   ` ishi soichi

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='CAEjRLuRSmbeBUCTWjbpkNHqnRZ=GtZxyYWh6SiNOuVfCpbRGzg@mail.gmail.com' \
    --to=soichi777@gmail.com \
    --cc=help-gnu-emacs@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.
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).