* bug#6917: forward-comment moves also if nil
@ 2010-08-26 7:33 Andreas Röhler
2011-07-16 18:47 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Röhler @ 2010-08-26 7:33 UTC (permalink / raw)
To: 6917
Hi,
if `(forward-comment 1)' is called with some empty lines
ahead followed by non-commented code, it returns nil
but travels buffer like
`(skip-chars-forward " \n")' would do.
Also it stops at next text, but doesn't reach next existing comment.
If not inside or in front of a comment,
(forward-comment 1) should behave like `search-forward',
or just return nil, if not successfully.
IMHO should be implemented a consistent design how to behave,
if a call to a move function don't find it's object.
Search-forward and forward-word differ here for example.
Thanks
Andreas
--
http://code.launchpad.net/~a-roehler/python-mode
http://code.launchpad.net/s-x-emacs-werkstatt/
In GNU Emacs 23.1.92.1 (i686-pc-linux-gnu, GTK+ Version 2.12.0)
of 2010-02-19
Windowing system distributor `The X.Org Foundation', version 11.0.70200000
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: de_DE.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<right> <return> <up> ( f o r w a r d - p o i n t SPC
1 ) C-x C-e <return> <left> C-x C-e <left> <left> <left>
<left> <left> <left> <left> M-d <left> c o m m e n
t C-d <right> <right> <right> C-x C-x C-e <right> <return>
<return> <return> ; <backspace> ( d a e ) <up> <up>
<up> <left> C-x C-e <right> M-d f o o <left> <left>
<left> d e f u n SPC <right> <right> <right> SPC (
) <up> <up> <up> <left> C-x C-e <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> M-x r e p o r t
- e m a c s - b u <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
call-interactively: End of buffer
210 [2 times]
exchange-point-and-mark: No mark set in this buffer
nil
nil
Load-path shadows:
None found.
Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#6917: forward-comment moves also if nil
2010-08-26 7:33 bug#6917: forward-comment moves also if nil Andreas Röhler
@ 2011-07-16 18:47 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2011-07-16 18:47 UTC (permalink / raw)
To: 6917-done
tags 6917 notabug wontfix
stop
> if `(forward-comment 1)' is called with some empty lines
> ahead followed by non-commented code, it returns nil
> but travels buffer like
> `(skip-chars-forward " \n")' would do.
It is behaving as documented:
Stop scanning if we find something other than a comment or whitespace.
Set point to where scanning stops.
If COUNT comments are found as expected, with nothing except
whitespace between them, return t; otherwise return nil.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-16 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 7:33 bug#6917: forward-comment moves also if nil Andreas Röhler
2011-07-16 18:47 ` Glenn Morris
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.