diff lisp/register.el @ 5695:9dc294ae3004

Fix erroneous regular xpression in register.el. Thank you Stephen Turnbull. lisp/ChangeLog additions: 2012-12-14 Mats Lidell <matsl@xemacs.org> * register.el (describe-register-1): Fix erroneous regular expression. Thank you Stephen Turnbull. tests/ChangeLog additions: 2012-12-14 Mats Lidell <matsl@xemacs.org> * automated/register-tests.el: New. Test for register.el. Test case for bug in regular expression in describe-register-1
author Mats Lidell <matsl@xemacs.org>
date Fri, 14 Dec 2012 01:19:36 +0100
parents 308d34e9f07d
children
line wrap: on
line diff
--- a/lisp/register.el	Tue Nov 06 23:12:06 2012 +0000
+++ b/lisp/register.el	Fri Dec 14 01:19:36 2012 +0100
@@ -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)