help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: override comment-or-uncomment-region gives an error


From: Drew Adams
Subject: RE: override comment-or-uncomment-region gives an error
Date: Wed, 29 May 2013 19:47:06 -0700 (PDT)

> 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))))
>
>   cond: Lisp nesting exceeds `max-lisp-eval-depth'

You have (c-o-u-r) calling (c-o-u-r) calling (c-o-u-r)...

See the Elisp manual about using defadvice.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]