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

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

'comment-search-forward' fails when 'comment-use-global-state' is nil


From: Thorsten Jolitz
Subject: 'comment-search-forward' fails when 'comment-use-global-state' is nil
Date: Tue, 14 May 2013 13:40:25 +0200
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

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 via email to

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