bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#7778: 24.0.50; just-one-space fails when optional argument is not pr


From: Tassilo Horn
Subject: bug#7778: 24.0.50; just-one-space fails when optional argument is not provided
Date: Mon, 03 Jan 2011 22:43:57 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Dustin Sallings <dustin@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@member.fsf.org>
+
+       * simple.el (just-one-space): Make argument n default to 1 if
+       omitted.
+
 2010-12-07  Stefan Monnier  <monnier@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]