Mercurial > emacs
comparison lisp/calc/calc-frac.el @ 90159:08185296b491
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-44
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 272-288)
- src/xdisp.c (dump_glyph_row): Don't display overlay_arrow_p field.
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 67)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 05 May 2005 00:04:55 +0000 |
parents | f2ebccfa87d4 e0224a91347d |
children | 187d6a1f84f7 |
comparison
equal
deleted
inserted
replaced
90158:bf4846baba9a | 90159:08185296b491 |
---|---|
1 ;;; calc-frac.el --- fraction functions for Calc | 1 ;;; calc-frac.el --- fraction functions for Calc |
2 | 2 |
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: David Gillespie <daveg@synaptics.com> | 5 ;; Author: David Gillespie <daveg@synaptics.com> |
6 ;; Maintainer: Jay Belanger <belanger@truman.edu> | 6 ;; Maintainer: Jay Belanger <belanger@truman.edu> |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
54 (interactive "sFraction separator: ") | 54 (interactive "sFraction separator: ") |
55 (calc-wrapper | 55 (calc-wrapper |
56 (if (string-match "\\`\\([^ 0-9][^ 0-9]?\\)[0-9]*\\'" fmt) | 56 (if (string-match "\\`\\([^ 0-9][^ 0-9]?\\)[0-9]*\\'" fmt) |
57 (let ((n nil)) | 57 (let ((n nil)) |
58 (if (/= (match-end 0) (match-end 1)) | 58 (if (/= (match-end 0) (match-end 1)) |
59 (setq n (string-to-int (substring fmt (match-end 1))) | 59 (setq n (string-to-number (substring fmt (match-end 1))) |
60 fmt (math-match-substring fmt 1))) | 60 fmt (math-match-substring fmt 1))) |
61 (if (eq n 0) (error "Bad denominator")) | 61 (if (eq n 0) (error "Bad denominator")) |
62 (calc-change-mode 'calc-frac-format (list fmt n) t)) | 62 (calc-change-mode 'calc-frac-format (list fmt n) t)) |
63 (error "Bad fraction separator format")))) | 63 (error "Bad fraction separator format")))) |
64 | 64 |