GNU bug report logs - #8151
add flyspell-prog-mode initiation example to Info

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Wed, 2 Mar 2011 12:25:01 UTC

Severity: minor

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8151 in the body.
You can then email your comments to 8151 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8151; Package emacs. (Wed, 02 Mar 2011 12:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 02 Mar 2011 12:25:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: add flyspell-prog-mode initiation example to Info
Date: Wed, 02 Mar 2011 20:22:54 +0800
In (info "(emacs) Spelling")

   Type `M-x flyspell-mode' to enable or disable this mode in the
   current buffer. To enable `flyspell-mode' in all text mode buffers,
   add `turn-on-flyspell' to `text-mode-hook'. ...

      Flyspell Prog mode works just like ordinary Flyspell mode, except
   that it only checks words in comments and string constants.  This
   feature is useful for editing programs.  Type `M-x flyspell-prog-mode'
   to enable or disable this mode in the current buffer.

OK, but the second paragraph doesn't say what hook to turn
flyspell-prog-mode on for all programs!

Or mention how to turn it on one by one...

Well it turns out one needs to use a totally different method to turn on
flyspell-prog-mode, e.g.,
(add-hook 'perl-mode-hook
  (function (lambda ()(flyspell-prog-mode))))
And it turns out there is no way to turn off flyspell-prog-mode... OK,
probably just turn off flyspell-mode.

Also in the mode line there is no distinction of the two types of
flyspell-mode... probably because no big deal.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8151; Package emacs. (Thu, 03 Mar 2011 07:37:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8151: add flyspell-prog-mode initiation example to Info
Date: Thu, 03 Mar 2011 00:35:59 -0700
On 3/2/11 5:22 AM, jidanni <at> jidanni.org wrote:
> In (info "(emacs) Spelling")
>
>     Type `M-x flyspell-mode' to enable or disable this mode in the
>     current buffer. To enable `flyspell-mode' in all text mode buffers,
>     add `turn-on-flyspell' to `text-mode-hook'. ...
>
>        Flyspell Prog mode works just like ordinary Flyspell mode, except
>     that it only checks words in comments and string constants.  This
>     feature is useful for editing programs.  Type `M-x flyspell-prog-mode'
>     to enable or disable this mode in the current buffer.
>
> OK, but the second paragraph doesn't say what hook to turn
> flyspell-prog-mode on for all programs!

In the absence of specific information, use the same method you would use to
turn any other minor mode on for all buffers in a particular major mode (or its
derivatives).

> Or mention how to turn it on one by one...

Do you mean buffer by buffer, or major mode by major mode?

Either way, that is not specific to flyspell-prog-mode.

> Well it turns out one needs to use a totally different method to turn on
> flyspell-prog-mode, e.g.,
> (add-hook 'perl-mode-hook
>    (function (lambda ()(flyspell-prog-mode))))
> And it turns out there is no way to turn off flyspell-prog-mode... OK,
> probably just turn off flyspell-mode.

(function (lambda () (foo-mode))) = (lambda () (foo-mode)) = (function foo-mode) 
= (quote foo) = 'foo

(funcall 'turn-on-foo-mode) = (foo-mode 1) = (foo-mode)

> Also in the mode line there is no distinction of the two types of
> flyspell-mode... probably because no big deal.

It might make sense to use Fly/Text and Fly/Prog in the mode line.

-- 
Kevin Rodgers
Denver, Colorado, USA





bug closed, send any further explanations to 8151 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Sun, 10 Apr 2011 21:43:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 May 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 45 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.