unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: 'comment-search-forward' fails when 'comment-use-global-state' is nil
Date: Tue, 14 May 2013 13:40:25 +0200	[thread overview]
Message-ID: <87sj1p3i3a.fsf@gmail.com> (raw)


Hi List, 

this is a valid comment in message-mode

,------------
| > * comment
`------------

and with point at the beginning of this line, 

,---------------------------------------------
| M-: (comment-search-forward (line-end-position))
`---------------------------------------------

should do this

,------------------------------------------------------------------
| Find a comment start between point and LIMIT.
| Moves point to inside the comment and returns the position of the
| comment-starter.
`------------------------------------------------------------------

This works for me in this buffer while I'm writing this email, but does
not work anymore if I copy the content of this buffer to a temporary
edit-buffer and set that buffer to message-mode.

Some debugging revealed that the difference between the two (apparently
equal) situations is that in the message buffer I write this email in,
'comment-use-global-state' is 't', while in the temporary edit-buffer in
message-mode the variable's value is 'nil', and the comment line is not
recognized any more by 'comment-search-forward'. 

Now I wonder how this difference can be explained, and how I can work
around it. I did not encounter this problem with temporary edit buffers
set to emacs-lisp-mode or picolisp-mode e.g., in that cases
'comment-search-forward' worked as expected. 

-- 
cheers,
Thorsten





                 reply	other threads:[~2013-05-14 11:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj1p3i3a.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.
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).