all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13670: 24.3.50; `autoload-generate-file-autoloads' off-by-one bug
@ 2013-02-10  0:03 Drew Adams
  2016-04-28 22:29 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2013-02-10  0:03 UTC (permalink / raw)
  To: 13670

This source code line of `autoload-generate-file-autoloads':
 
 (if (= (char-after (1+ (point))) ? )
 
should be replaced by this:
 
 (if (= (char-after (point)) ? )
 
The aim is to preserve the whitespace that occurs after a separating
whitespace character, not to preserve also that separating character.
 
`;;;###autoload' cannot be followed by normal text, or else the cookie
is not recognized as such.  But you can follow it by a space and then
the text that you want.  The space is not part of the text to be
copied to the output file; it is only a separator for parsing the
cookie.
 
E.g. Suppose you want to have a multiline doc string, such as this:
 
"Icicle mode: Toggle minibuffer input completion and cycling.
Non-nil prefix ARG turns mode on if ARG > 0, else off.
It is a global minor mode.  It binds minibuffer keys."
 
You can use cookies like this:
 
;;;###autoload (autoload 'icicle-mode "icicles" 
;;;###autoload"Icicle mode: Toggle minibuffer input completion and cycling.
;;;###autoload Non-nil prefix ARG turns mode on if ARG > 0, else off.
;;;###autoload It is a global minor mode.  It binds minibuffer keys."
;;;###autoload t nil)
 
But with the bugged code that preserves the space separator as if it
were part of the doc string, the result is this:
 
(autoload 'icicle-mode "icicles" 
"Icicle mode: Toggle minibuffer input completion and cycling.
 Non-nil prefix ARG turns mode on if ARG > 0, else off.
 It is a global minor mode.  It binds minibuffer keys."
 t nil)
 
which gives the erroneous doc string:
 
"Icicle mode: Toggle minibuffer input completion and cycling.
 Non-nil prefix ARG turns mode on if ARG > 0, else off.
 It is a global minor mode.  It binds minibuffer keys."
 
With the fix, the result is correct:
 
(autoload 'icicle-mode "icicles" 
"Icicle mode: Toggle minibuffer input completion and cycling.
Non-nil prefix ARG turns mode on if ARG > 0, else off.
It is a global minor mode.  It binds minibuffer keys."
t nil)
 
Doc string:
 
"Icicle mode: Toggle minibuffer input completion and cycling.
Non-nil prefix ARG turns mode on if ARG > 0, else off.
It is a global minor mode.  It binds minibuffer keys."
 
However, I see that this bug (as I see it) dates back to at least
Emacs 20.7.  So if I am wrong that this is a bug, please explain
how to get proper multiline doc strings.
 
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
 of 2013-02-08 on VBOX-W7
Bzr revision: 111700 monnier@iro.umontreal.ca-20130208174209-vpjpdh4qipaceoh5
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -IC:/emacs/libs/libXpm-3.5.10/include -IC:/emacs/libs/libXpm-3.5.10/src
 -IC:/emacs/libs/libpng-dev_1.4.3-1_win32/include
 -IC:/emacs/libs/zlib-dev_1.2.5-2_win32/include
 -IC:/emacs/libs/giflib-4.1.4-1-lib/include
 -IC:/emacs/libs/jpeg-6b-4-lib/include
 -IC:/emacs/libs/tiff-3.8.2-1-lib/include
 -IC:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2
 -IC:/emacs/libs/gnutls-3.1.5-w32/include
 -IC:/emacs/libs/libiconv-1.14-2-mingw32-dev/include'
 






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

end of thread, other threads:[~2016-05-01 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-10  0:03 bug#13670: 24.3.50; `autoload-generate-file-autoloads' off-by-one bug Drew Adams
2016-04-28 22:29 ` Lars Ingebrigtsen
2016-04-29 16:11   ` Drew Adams
2016-05-01 15:34     ` Michael Heerdegen
2016-05-01 16:11       ` Drew Adams

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.