GNU bug report logs -
#7778
24.0.50; just-one-space fails when optional argument is not provided
Previous Next
Reported by: Dustin Sallings <dustin <at> membase.com>
Date: Mon, 3 Jan 2011 19:58:02 UTC
Severity: normal
Found in version 24.0.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 7778 <at> debbugs.gnu.org (full text, mbox):
Dustin Sallings <dustin <at> membase.com> writes:
Hi Dustin,
> Any invocation of (just-one-space) without providing a numeric
> argument.
I think, I've already fixed that on the trunk with the bzr commit
102603: Tassilo Horn 2010-12-07 * simple.el (just-one-space)
That was the diff.
--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog 2010-12-07 15:36:08 +0000
+++ lisp/ChangeLog 2010-12-07 19:38:38 +0000
@@ -1,3 +1,8 @@
+2010-12-07 Tassilo Horn <tassilo <at> member.fsf.org>
+
+ * simple.el (just-one-space): Make argument n default to 1 if
+ omitted.
+
2010-12-07 Stefan Monnier <monnier <at> iro.umontreal.ca>
* electric.el (electric-indent-post-self-insert-function):
=== modified file 'lisp/simple.el'
--- lisp/simple.el 2010-12-06 18:21:42 +0000
+++ lisp/simple.el 2010-12-07 19:38:38 +0000
@@ -764,6 +764,7 @@
"Delete all spaces and tabs around point, leaving one space (or N spaces).
If N is negative, deletes carriage return and linefeed characters as well."
(interactive "*p")
+ (unless n (setq n 1))
(let ((orig-pos (point))
(skip-characters (if (< n 0) " \t\n\r" " \t"))
(n (abs n)))
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
This bug report was last modified 14 years and 199 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.