unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Problem with elisp highilghting/parsing code.
@ 2004-08-18 18:03 Velizar Bodurski
  0 siblings, 0 replies; 2+ messages in thread
From: Velizar Bodurski @ 2004-08-18 18:03 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i386-msvc-nt5.1.2600)
 of 2003-03-26 on TJUMP20
configured using `configure --with-msvc (13.00)'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

The example code is:
(defun just-a-test ()
  "this is a test
(code)"
  (interactive)
  (progn
    (message "hello")))

in the above code highlighting and auto-indent does not work,
i.e. copy that code into *scratch* buffer and try editing the code,
for example delete 'progn' and then write 'prog1' in its place,
what I see is that prog1 is highlighted as a string. The source of
this problem seems to be the '(code)' in function's help string, if
for example single space is added at the line's beginning before
'(code)', highlighting/autoindent is OK, or if the '(code)' is
moved on the same line as 'this is just a test' string then again
autoindent/highlighting is OK. But when there is string with openning
brace at the line's beginning (which is actually within a string)
parsing lisp does not work correctly (even C-M-x does not recognize
the above code as a valid form and skips it in its search for valid
form to evaluate).
(Regarding platforms on which the problem is seen, initially this
problem was found on Linux with Emacs 21.3.1.

Also reproduced the same problem with 'emacs -q --no-init-file'.

Recent input:
c s - d e v e l SPC <backspace> @ b a <backspace> <backspace> 
g n u . o r g C-x 4 b <return> L C-r e m a c s <return> 
<return> <return> q C-x b <return> C-n P r o b l e 
m SPC w i t h SPC e l i s p SPC h i g h l i g h t i 
n g SPC c o d e . C-x C-s C-c C-k l <language-change> 
M-x <language-change> r e p o SPC r t SPC b SPC <backspace> 
SPC SPC <return>

Recent messages:
No more unread newsgroups
Mark saved where search started
Retrieving newsgroup: nnml:mail.emacs-devel...
Fetching headers for nnml:mail.emacs-devel...done
Sorting threads...done
Generating summary...done
No more unread newsgroups
Wrote c:/News/drafts/drafts/2
Making completion list...
Loading emacsbug...done

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with elisp highilghting/parsing code.
       [not found] <mailman.1787.1092852346.2011.bug-gnu-emacs@gnu.org>
@ 2004-08-18 21:12 ` Matt Hodges
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Hodges @ 2004-08-18 21:12 UTC (permalink / raw)


>>>>> Velizar Bodurski writes:

 > The example code is:
 > (defun just-a-test ()
 >   "this is a test
 > (code)"
 >   (interactive)
 >   (progn
 >     (message "hello")))

 > in the above code highlighting and auto-indent does not work,

See (info "(elisp)Documentation Tips."), in particular:

   * If a line in a documentation string begins with an
     open-parenthesis, write a backslash before the open-parenthesis,
     like this:

          The argument FOO can be either a number
          \(a buffer position) or a string (a file name).

     This prevents the open-parenthesis from being treated as the start
     of a defun (*note Defuns: (emacs)Defuns.).

Matt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-18 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-18 18:03 Problem with elisp highilghting/parsing code Velizar Bodurski
     [not found] <mailman.1787.1092852346.2011.bug-gnu-emacs@gnu.org>
2004-08-18 21:12 ` Matt Hodges

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).