diff lisp/align.el @ 109940:5f6bc820aec9

Minor align-regexp fix. * lisp/align.el (align-regexp): Make group and spacing arguments use the interactive defaults when non-interactive. (Bug#6698)
author Glenn Morris <rgm@gnu.org>
date Fri, 20 Aug 2010 00:33:06 -0700
parents 215efa9f5db1
children 376148b31b5e
line wrap: on
line diff
--- a/lisp/align.el	Fri Aug 20 00:11:35 2010 -0700
+++ b/lisp/align.el	Fri Aug 20 00:33:06 2010 -0700
@@ -1,7 +1,7 @@
 ;;; align.el --- align text to a specific column, by regexp
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 ;; Maintainer: FSF
@@ -944,6 +944,8 @@
       (list (concat "\\(\\s-*\\)"
 		    (read-string "Align regexp: "))
 	    1 align-default-spacing nil))))
+  (or group (setq group 1))
+  (or spacing (setq spacing align-default-spacing))
   (let ((rule
 	 (list (list nil (cons 'regexp regexp)
 		     (cons 'group (abs group))