all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lawrence Mitchell <wence@gmx.li>
To: 10868@debbugs.gnu.org
Subject: bug#10868: 24.0.93; `comment-style' needs to be explained
Date: Thu, 23 Feb 2012 09:22:24 +0000	[thread overview]
Message-ID: <87ehtlykdr.fsf@gmx.li> (raw)
In-Reply-To: <DB139E6F33CC441B9C3798B66C9D52FE@us.oracle.com>

Drew Adams wrote:
>>> Read the bug #3370 thread, if you want to understand the problem.

>> Unfortunately, I did. It is long-winded and goes nowhere.
>> I encourage everyone else not to bother.

> Is it really so hard to understand?

>  "the doc string for `comment-style' (which is pretty much
>   useless) refers to `comment-styles', which is not
>   recognized (and therefore has no link)."

> emacs -Q

> C-h v comment-style

>  Style to be used for `comment-region'.
>  See `comment-styles' for a list of available styles.

> C-h v comment-styles

> Bzzzzt -not recognized - no such variable, no such "list of available styles"
> ... until you load newcomment.el.

[...]

OK, here's the problem, and here's a patch.

2012-02-23  Lawrence Mitchell <wence@gmx.li>

* lisp/newcomment.el: Autoload comment-styles (Bug#3370).

The docstring of comment-style refers the user to comment-styles for
details on what the values mean.  However, this is not available until
after newcomment.el is loaded.  So autoload comment-styles to avoid
this problem.
---
 lisp/newcomment.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 16282af..cd887cb 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -185,6 +185,7 @@ The `plain' comment style doubles this value.
 This should generally stay 0, except for a few modes like Lisp where
 it is 1 so that regions are commented with two or three semi-colons.")
 
+;;;###autoload
 (defconst comment-styles
   '((plain      nil nil nil nil
                 "Start in column 0 (do not indent), as in Emacs-20")
-- 
1.7.9.rc0.23.g7e521






  reply	other threads:[~2012-02-23  9:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 17:17 bug#10868: 24.0.93; `comment-style' needs to be explained Drew Adams
2012-02-22 17:38 ` Glenn Morris
2012-02-22 18:06   ` Drew Adams
2012-02-22 18:11     ` Glenn Morris
2012-02-22 19:01       ` Drew Adams
2012-02-23  9:22         ` Lawrence Mitchell [this message]
2012-02-23 14:31           ` Stefan Monnier
2012-02-23 15:35             ` Drew Adams
2012-02-23 16:04               ` Stefan Monnier
2012-02-23 16:13                 ` Drew Adams
2012-02-25  3:08             ` Chong Yidong
2012-02-23 17:16           ` Glenn Morris
2012-02-23 17:22             ` Glenn Morris
2012-02-23 17:24             ` Lawrence Mitchell
2012-02-23 17:34             ` Drew Adams
2012-02-23 21:48             ` Finding a variable before it's loaded Stefan Monnier
2012-02-23 22:29               ` Lennart Borgman

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=87ehtlykdr.fsf@gmx.li \
    --to=wence@gmx.li \
    --cc=10868@debbugs.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.