[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flush-lines has "optional" arguments that aren't necessarily optional
From: |
Joe Corneli |
Subject: |
flush-lines has "optional" arguments that aren't necessarily optional |
Date: |
Sat, 19 Feb 2005 14:36:46 -0600 |
This is a minor issue, but...
`flush-lines' claims that its second and third arguments
are optional. However, if the first argument is
present and the third is not, it does a test that doesn't
make sense. Thus, if the second argument is supplied,
the third is no longer optional.
(defun flush-lines (regexp &optional rstart rend)
[...]
(if rstart
(progn
(goto-char (min rstart rend))
[...]
IMO, the function should be rewritten so that both
arguments are truly optional, and both independently
take their default values if the other is not specified.
(flush-lines "foo" (point-min))
In GNU Emacs 21.3.50.1 (powerpc-apple-darwin7.4.0, X toolkit)
of 2004-06-22 on hope-of-a-stone.local
configured using `configure '--prefix=/sw' '--without-carbon' '--with-x'
'--without-gif' '--infodir=${prefix}/share/info' '--mandir=${prefix}/share/man'
'--libexecdir=${prefix}/lib' '--with-x-toolkit=lucid'
'--without-toolkit-scroll-bars' 'CPPFLAGS=-I/sw/include' 'LDFLAGS=-L/sw/lib''
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: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
auto-image-file-mode: t
show-paren-mode: t
display-time-mode: t
mouse-wheel-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
C-y SPC C-a <right> <delete> <delete> C-e C-x C-e C-x
C-g C-a C-x o C-a M-f M-f C-h f <return> C-x o C-x
o C-x o <tab> <return> C-l C-s r s t a r t C-s C-s
<down> <left> <left> <left> <left> <left> <left> <right>
<left> <C-right> C-l C-SPC C-a <up> <up> M-w M-x b
u g <tab> <M-backspace> r e p <tab> o <tab> <M-backspace>
C-g M-x C-g M-x a p r o p o s <return> p r e t e t
<backspace> s t <return> M-x r e p o r t <tab> b <tab>
<return>
Recent messages:
Type C-t b w RET to restore the other window. C-M-v to scroll the help.
mouse-2, RET: find function's definition
Note: file is write protected
Mark saved where search started
Mark set
Making completion list... [2 times]
Quit [2 times]
Loading apropos...done
No apropos matches for `pretest'
Loading emacsbug...done
- flush-lines has "optional" arguments that aren't necessarily optional,
Joe Corneli <=