* lisp/calc/calc-forms.el (calc-date-notation): Fix regexp
authorJay Belanger <jay.p.belanger@gmail.com>
Wed, 28 Nov 2012 04:51:13 +0000 (22:51 -0600)
committerJay Belanger <jay.p.belanger@gmail.com>
Wed, 28 Nov 2012 04:51:13 +0000 (22:51 -0600)
  used to find time codes.  Fix symbol for seconds.

lisp/ChangeLog
lisp/calc/calc-forms.el

index 6a1ac6f..1ec3c88 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-28  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-forms.el (calc-date-notation): Fix regexp
+       used to find time codes.  Fix symbol for seconds.
+
 2012-11-27  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/derived.el (derived-mode-make-docstring):
index 98b2255..15a1530 100644 (file)
@@ -94,7 +94,8 @@
        (setcar (nthcdr arg calc-standard-date-formats) fmt))
    (let ((case-fold-search nil))
      (and (not (string-match "<.*>" fmt))
-         (string-match "\\`[^hHspP]*\\([^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*[bBhHmpPsS]+[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\)[^hHspP]*\\'" fmt)
+          ;; Find time part to put in <...>
+         (string-match "\\`[^hHspP]*\\([^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\(bs\\|bm\\|bh\\|BS\\|BH\\|[hHmpPsS]\\)+[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\)[^hHspP]*\\'" fmt)
          (string-match (concat "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*"
                                (regexp-quote (math-match-substring fmt 1))
                                "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*") fmt)
                                W www Www Wwww WWW WWWW
                                h hh bh H HH BH
                                p P pp PP pppp PPPP
-                               m mm bm s ss bss SS BS C
+                               m mm bm s ss bs SS BS C
                                N n J j U b))
                  (and (eq sym 'X) (not lfmt) (not fullfmt))
                  (error "Bad format code: %s" sym))