unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* override comment-or-uncomment-region gives an error
@ 2013-05-30  2:05 ishi soichi
  2013-05-30  2:47 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: ishi soichi @ 2013-05-30  2:05 UTC (permalink / raw)
  To: help-gnu-emacs

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


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

end of thread, other threads:[~2013-06-04  3:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30  2:05 override comment-or-uncomment-region gives an error ishi soichi
2013-05-30  2:47 ` 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

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