1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/9dc294ae3004/
changeset: 9dc294ae3004
user: matsl
date: 2012-12-14 01:19:36
summary: Fix erroneous regular xpression in register.el. Thank you Stephen Turnbull.
lisp/ChangeLog additions:
2012-12-14 Mats Lidell <matsl(a)xemacs.org>
* register.el (describe-register-1): Fix erroneous regular
expression. Thank you Stephen Turnbull.
tests/ChangeLog additions:
2012-12-14 Mats Lidell <matsl(a)xemacs.org>
* automated/register-tests.el: New. Test for register.el. Test
case for bug in regular expression in describe-register-1
affected #: 4 files
diff -r 7f4c8574a590f3e3457bdecf5716aa21a64626c8 -r
9dc294ae3004d8bf4a793daeef11f559601ccb43 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-14 Mats Lidell <matsl(a)xemacs.org>
+
+ * register.el (describe-register-1): Fix erroneous regular
+ expression. Thank you Stephen Turnbull.
+
2012-11-06 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (equal, member, assoc, rassoc):
diff -r 7f4c8574a590f3e3457bdecf5716aa21a64626c8 -r
9dc294ae3004d8bf4a793daeef11f559601ccb43 lisp/register.el
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -1,6 +1,6 @@
;;; register.el --- register commands for Emacs
-;; Copyright (C) 1985, 1993, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1993, 1994, 1997, 2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal, dumped
@@ -237,7 +237,7 @@
(princ val))
(cond
;; Extract first N characters starting with first non-whitespace.
- ((string-match (format "[^ \t\n].\\{,%d\\}"
+ ((string-match (format "[^ \t\n].\\{0,%d\\}"
;; Deduct 6 for the spaces inserted below.
(min 20 (max 0 (- (window-width) 6))))
val)
diff -r 7f4c8574a590f3e3457bdecf5716aa21a64626c8 -r
9dc294ae3004d8bf4a793daeef11f559601ccb43 tests/ChangeLog
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-14 Mats Lidell <matsl(a)xemacs.org>
+
+ * automated/register-tests.el: New. Test for register.el. Test
+ case for bug in regular expression in describe-register-1
+
2012-10-13 Mats Lidell <matsl(a)xemacs.org>
* automated/process-tests.el: Simple test cases for
diff -r 7f4c8574a590f3e3457bdecf5716aa21a64626c8 -r
9dc294ae3004d8bf4a793daeef11f559601ccb43 tests/automated/register-tests.el
--- /dev/null
+++ b/tests/automated/register-tests.el
@@ -0,0 +1,48 @@
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; Author: Mats Lidell <matsl(a)xemacs.org>
+;; Maintainer:
+;; Created: 2012
+;; Keywords: tests
+
+;; This file is part of XEmacs.
+
+;; XEmacs is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by the
+;; Free Software Foundation, either version 3 of the License, or (at your
+;; option) any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+;; for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs. If not, see <
http://www.gnu.org/licenses/>.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; Test tag support.
+;; See test-harness.el for instructions on how to run these tests.
+
+(require 'test-harness)
+
+(let ((s "Short"))
+ (with-output-to-temp-buffer "*Output Register Tests*"
+ (set-register 'a s)
+ (Assert (equal (get-register 'a) s))
+ (Assert (equal (describe-register-1 'a t) s))
+ (Assert (equal (describe-register-1 'a) s))))
+
+;; describe-register-1 without verbose on depends on window-width
+;; which is 10!? in batch mode. Hence the short part of the string
+;; returned
+
+(let ((s "String longer than 5 chars"))
+ (with-output-to-temp-buffer "*Output Register Tests*"
+ (set-register 'a s)
+ (Assert (equal (get-register 'a) s))
+ (Assert (equal (describe-register-1 'a t) s))
+ (Assert (equal (describe-register-1 'a) (subseq s 0 5)))))
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches