From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: `comment-start' is nil
Date: Wed, 12 Mar 2014 23:26:43 +0100 [thread overview]
Message-ID: <87y50foxy4.fsf@gmail.com> (raw)
In-Reply-To: 878usf6qu5.fsf@yun.yagibdah.de
lee <lee@yun.yagibdah.de> writes:
> Hi,
>
> I´m using desktop-mode to restore the previous session when starting
> emacs. For some buffers that are restored this way, I´m using a mode
> I´m working on. This mode employs a function to search for a regex in
> particular buffers. The regex involves `comment-start'.
>
> Unfortunately, at the time the function is running during start-up, the
> value of `comment-start' is nil.
>
>
> (let ((end-marker (concat "^" comment-start lsl-hi-lock-patterns-end-marker)))
> (message "comment-start with %s is %s"
> (buffer-name)
> comment-start) ...)
>
>
> gives me messages like "comment-start with test-plane.fontify is nil".
> Calling the same function later works fine because `comment-start' isn´t
> nil anymore.
>
> Is it supposed to be like this, or is it a bug that `comment-start' is
> nil?
>
>
> I could work around it by setting `comment-start' to "# ", or by
> omitting it, when it´s nil, but if it´s a bug, it should rather be
> fixed ...
maybe call
,-----------------------------------------------------------------------
| comment-normalize-vars is a compiled Lisp function in `newcomment.el'.
|
| (comment-normalize-vars &optional NOERROR)
|
| Check and set up variables needed by other commenting functions.
| All the `comment-*' commands call this function to set up various
| variables, like `comment-start', to ensure that the commenting
| functions work correctly. Lisp callers of any other `comment-*'
| function should first call this function explicitly.
`-----------------------------------------------------------------------
before using comment-start?
--
cheers,
Thorsten
next prev parent reply other threads:[~2014-03-12 22:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 21:37 `comment-start' is nil lee
2014-03-12 21:56 ` Juanma Barranquero
2014-03-15 20:50 ` lee
2014-03-12 22:26 ` Thorsten Jolitz [this message]
2014-03-13 6:36 ` Michael Heerdegen
2014-03-15 21:01 ` lee
2014-03-16 17:18 ` Stefan
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=87y50foxy4.fsf@gmail.com \
--to=tjolitz@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.
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.