summaryrefslogtreecommitdiff
path: root/lisp/calc
Commit message (Collapse)AuthorAgeFilesLines
* * doc/misc/calc.texi (Free-Form Dates): Expand on the date readingJay Belanger2013-01-011-0/+1
| | | | | | algorithm. * lisp/calc/README: Mention ISO 8601 week-numbering dates.
* * calc/calc-forms.el (math-parse-date): Try usingJay Belanger2012-12-301-6/+18
| | | | | | | `math-parse-iso-date' when it looks like it might be needed. Allow times of 24:00. (math-parse-date-validate, math-parse-iso-date-validate): Allow times of 24:00.
* * calc/calc.el (calc-standard-date-formats): Adjust one of theJay Belanger2012-12-151-1/+1
| | | | standard date formats.
* * lisp/calc/calc-forms.el (calc-date-notation): Fix typo.Jay Belanger2012-12-101-1/+1
|
* * lisp/calc/calc.el (calc-standard-date-formats): Add more dateJay Belanger2012-12-102-3/+34
| | | | | | | | | formats. * lisp/calc/calc-forms.el (math-parse-iso-date): New function. (math-parse-date): Use `math-parse-iso-date' when appropriate. (math-parse-iso-date-validate): Add extra error checking. (calc-date-notation): Add ability to access new date formats.
* * lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix weekday number.Jay Belanger2012-12-021-1/+2
|
* * lisp/calc/calc-forms.el (math-date-to-iso-dt): Fix typo.Jay Belanger2012-12-021-4/+2
|
* * lisp/calc/calc-forms.el (math-absolute-from-iso-dt)Jay Belanger2012-12-021-19/+128
| | | | | | | | | (math-date-to-iso-dt, math-parse-iso-date-validate) (math-iso-dt-to-date): New functions. (math-fd-iso-dt, math-fd-isoyear, math-fd-isoweek) (math-fd-isoweekday): New variables. (calc-date-notation, math-parse-standard-date, math-format-date) (math-format-date-part): Add support for more formatting codes.
* * lisp/calc/calc-forms.el (calc-date-notation): Fix regexpJay Belanger2012-11-271-2/+3
| | | | used to find time codes. Fix symbol for seconds.
* * calc/calc.el (calc-gregorian-switch): In menu, put dates before regions.Paul Eggert2012-11-221-13/+12
| | | | | | | | | | | | This is easier to follow, lines up better in the menu, and lets us coalesce regions that switch at the same time. Give country names, not "Vatican", as that's better for non-expert users. Use names that are stable between the date of switch and now, e.g., Bohemia and Moravia (which existed then and now) and not Czechoslovakia (which didn't exist then and doesn't exist now). What is now the U.S. mostly did not switch at the same time as Britain, so omit the U.S. Correct spelling of "Britain". Catholic Switzerland was too much of a mess, so omit it.
* * calc/calc.el (calc-gregorian-switch): Move to after calc-refreshPaul Eggert2012-11-211-45/+45
| | | | definition. This fixes a bootstrap failure.
* * doc/misc/calc.texi (Date Forms): Mention the customizableJay Belanger2012-11-212-4/+12
| | | | | | | | Gregorian-Julian switch. (Customizing Calc): Mention the variable `calc-gregorian-switch'. * calc/calc.el (calc-gregorian-switch): Refresh the Calc buffer after the variable is changed.
* * calc/calc-forms.el (math-leap-year-p): Fix formula for negativeJay Belanger2012-11-181-5/+8
| | | | | | year numbers. (math-date-to-julian-dt): Adjust the initial approximation for the year to deal with the new definition of the DATE.
* * calc/calc-forms.el (math-date-to-dt): Use integer dateJay Belanger2012-11-171-2/+2
| | | | when calling `math-date-to-julian-dt' and 'math-date-to-gregorian-dt'.
* Silence some warnings.Juanma Barranquero2012-11-181-3/+5
| | | | | lisp/woman.el (woman-non-underline-faces): Use `set-face-underline'. lisp/calc/calc.el (math-format-date-cache): Declare.
* Calc now uses the Gregorian calendar for all dates,Paul Eggert2012-11-171-6/+6
| | | | | | | | and uses January 1, 1 AD as its day number 1. * doc/misc/calc.texi (Date Forms): Document this. * lisp/calc/calc-forms.el (math-julian-date-beginning) (math-julian-date-beginning-int): Implement this.
* * calc/calc-forms.el (calc-gregorian-switch): Declare.Jay Belanger2012-11-171-1/+5
|
* * calc/calc.el (calc-gregorian-switch): New variable.Jay Belanger2012-11-172-74/+293
| | | | | | | | | | | | | | | | | * calc/calc-forms.el (math-day-in-year, math-dt-before-p) (math-absolute-from-gregorian-dt, math-absolute-from-julian-dt) (math-date-to-julian-dt, math-date-to-gregorian-dt): New functions. (math-leap-year-p): Add option to distinguish between Julian and Gregorian calendars. (math-day-number): Use `math-day-in-year' to do the computations. (math-absolute-from-dt): Rename from `math-absolute-from-date'. Use `math-absolute-from-gregorian' and `math-absolute-from-julian' to do the computations. (math-date-to-dt): Use `math-date-to-julian-dt' and `math-date-to-gregorian-dt' to do the computations. (calcFunc-weekday, math-format-date-part): Use the new version of the DATE to determine the weekday. (calcFunc-newmonth, calcFunc-newyear): Use `calc-gregorian-switch' when necessary.
* calc/calc-units.el (math-extract-units): Properly extract powers of units.Jay Belanger2012-10-191-4/+10
|
* Add missing :version tagsGlenn Morris2012-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * profiler.el (profiler): Add missing group :version tag. * avoid.el (mouse-avoidance-banish-position): * proced.el (proced-renice-command): * calc/calc.el (calc-ensure-consistent-units): * calendar/icalendar.el (icalendar-import-format-uid): * net/tramp.el (tramp-save-ad-hoc-proxies): * progmodes/bug-reference.el (bug-reference-bug-regexp): * progmodes/flymake.el (flymake-error-bitmap) (flymake-warning-bitmap, flymake-fringe-indicator-position): * progmodes/sh-script.el (sh-indent-after-continuation): * progmodes/verilog-mode.el (verilog-auto-template-warn-unused) (verilog-before-save-font-hook, verilog-after-save-font-hook): * progmodes/vhdl-mode.el (vhdl-makefile-default-targets) (vhdl-array-index-record-field-in-sensitivity-list) (vhdl-indent-comment-like-next-code-line): * textmodes/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-macro-prompt, reftex-ref-style-default-list) (reftex-cite-key-separator, reftex-create-bibtex-header) (reftex-create-bibtex-footer): * textmodes/rst.el (rst-new-adornment-down, rst-indent-field) (rst-indent-literal-normal, rst-indent-literal-minimized) (rst-indent-comment): Add missing custom :version tags. * cedet/semantic/complete.el (semantic-displayor-tooltip-mode) (semantic-displayor-tooltip-initial-max-tags) (semantic-displayor-tooltip-max-tags): Add missing custom :version tags. * cedet/ede/linux.el (project-linux): Add missing group :version tag. * cedet/semantic/complete.el (semantic-displayor-tooltip-max-tags): Doc fix. * erc/erc.el (erc-lurker): * erc/erc-desktop-notifications.el (erc-notifications): Add missing group :version tags. * gnus/gnus-notifications.el (gnus-notifications): Add missing group :version tag. * gnus/gnus-msg.el (gnus-gcc-pre-body-encode-hook) (gnus-gcc-post-body-encode-hook): * gnus/gnus-sync.el (gnus-sync-lesync-name) (gnus-sync-lesync-install-topics): Add missing custom :version tags.
* * lisp/calc/calc.el: Fix last change by removing the whole chunk, since itStefan Monnier2012-09-201-28/+0
| | | | was only needed back when Calc was not bundled.
* * lisp/calc/calc.el: Remove redundant autoload shape check.Stefan Monnier2012-09-194-27/+18
| | | | | | | | | | (sel-mode): Don't defvar. (calc-get-stack-element): Add `sel-mode' arg instead. (calc-top, calc-top-list): Pass it this additional argument. * lisp/calc/calc-store.el (calc-store-map): * lisp/calc/calc-map.el (calc-apply, calc-reduce, calc-map) (calc-map-equation, calc-outer-product, calc-inner-product): * lisp/calc/calc-aent.el (calc-alg-entry): Don't bind sel-mode.
* Update docstrings and comments to use "init file" terminology.Chong Yidong2012-09-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bookmark.el (bookmark-bmenu-toggle-filenames): Doc fixes. * comint.el (comint-prompt-read-only): * custom.el (defcustom): * hi-lock.el (hi-lock-mode): * ibuffer.el (ibuffer-formats): * ielm.el (ielm-prompt-read-only): * novice.el (disable-command): * saveplace.el (toggle-save-place): * speedbar.el (speedbar-supported-extension-expressions): * startup.el (auto-save-list-file-prefix, init-file-user) (after-init-hook, inhibit-startup-echo-area-message): * strokes.el (strokes-help): * time-stamp.el (time-stamp): * calendar/calendar.el (calendar, diary-file): * calendar/diary-lib.el (diary-mail-entries, diary) (diary-list-entries-hook): * calendar/holidays.el (holidays, calendar-holidays): * calendar/lunar.el (lunar-phases): * calendar/solar.el (sunrise-sunset): * emulation/edt.el (edt-load-keys): * emulation/viper.el (viper-mode): * eshell/em-alias.el (eshell-command-aliases-list): * eshell/esh-util.el (eshell-convert-numeric-arguments): * international/ogonek.el (ogonek-information): * net/tramp-cmds.el (tramp-bug): * net/quickurl.el (quickurl-reread-hook-postfix): * play/decipher.el (decipher-font-lock-keywords): * progmodes/cc-styles.el (c-set-style): * progmodes/idlw-shell.el (idlwave-shell-prompt-pattern): * progmodes/inf-lisp.el (inferior-lisp-prompt): * progmodes/octave-mod.el (octave-mode): * progmodes/sql.el (sql-mode, sql-interactive-mode, sql-password): * progmodes/verilog-mode.el (verilog-read-defines): * textmodes/two-column.el (2C-mode): Likewise.
* Update some function declarationsGlenn Morris2012-09-132-2/+2
| | | | | | | | * lisp/calc/calc-ext.el (math-compose-expr): * lisp/calc/calc.el (math-compose-expr): * lisp/progmodes/cc-defs.el (cl-macroexpand-all): * lisp/progmodes/cc-langs.el (delete-duplicates, mapcan) (cl-macroexpand-all): Update declarations.
* Better seed support for (random).Paul Eggert2012-08-311-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/numbers.texi (Random Numbers): Document new behavior of the calls (random) and (random STRING). * etc/NEWS: Document new behavior of (random), (random "string"). * lisp/play/5x5.el, lisp/play/animate.el, lisp/play/cookie1.el: * lisp/play/dissociate.el, lisp/play/doctor.el, lisp/play/dunnet.el: * lisp/play/gomoku.el, lisp/play/landmark.el, lisp/play/mpuz.el: * lisp/play/tetris.el, lisp/play/zone.el: * lisp/calc/calc-comb.el (math-init-random-base): * lisp/play/blackbox.el (bb-init-board): * lisp/play/life.el (life): * lisp/server.el (server-use-tcp): * lisp/type-break.el (type-break): Remove unnecessary call to (random t). * lisp/net/sasl.el (sasl-unique-id-function): Change (random t) to (random), now that the latter is more random. * lisp/play/life.el (life-initialized): Remove no-longer-needed var. * lisp/gnus/gnus-sync.el (gnus-sync-lesync-setup): * lisp/gnus/message.el (message-canlock-generate, message-unique-id): Change (random t) to (random), now that the latter is more random. * lisp/org/org-id.el (org-id-uuid): Change (random t) to (random), now that the latter is more random. * src/emacs.c (main): Call init_random. * src/fns.c (Frandom): Set the seed from a string argument, if given. Remove long-obsolete Gentzel cruft. * src/lisp.h, src/sysdep.c (seed_random): Now takes address and size, not long. (init_random): New function.
* Spelling fixes.Paul Eggert2012-08-261-1/+1
| | | | * Makefile.in (.PHONY): versioclean -> versionclean.
* Replace version 24.2 with 24.3 where appropriate (hopefully)Glenn Morris2012-08-151-1/+1
|
* calc/calc-units.el (math-default-units-table): Give it anJay Belanger2012-08-111-57/+60
| | | | | | | | initial value. (math-put-default-units): Add options to put composite units and unit systems in default units table. (calc-convert-units): Send composite units to `math-put-default-units' when appropriate.
* calccomp.el (math-compose-expr): Add extra argument indicating thatJay Belanger2012-08-091-4/+9
| | | | | parentheses should be put around products in denominators. Give multiplication precedence over division during composition.
* calc/calc-menu.el (calc-modes-menu): Fix menu item.Jay Belanger2012-08-081-1/+1
|
* calc-menu.el (calc-modes-menu): Add entries for matrix modesJay Belanger2012-08-081-0/+96
| | | | and simplification modes.
* calc-misc.el (calc-record-why): Don't record a message twice.Jay Belanger2012-08-071-1/+2
|
* * calc/calc-prog.el (math-do-defmath): Use backquote forms. FixAndreas Schwab2012-08-074-202/+142
| | | | | | | | | | | | | | | | handling of interactive spec when the body uses return. (math-do-arg-check, math-define-function-body): Use backquote forms. * calc/calc-ext.el (math-defcache): Likewise. * calc/calc-rewr.el (math-rwfail, math-rweval): Likewise. * allout.el (allout-new-exposure): Likewise. * calc/calcalg2.el (math-tracing-integral): Likewise. * info.el (Info-last-menu-item): Likewise. * emulation/vip.el (vip-loop): Likewise. * textmodes/artist.el (artist-funcall): Likewise. * menu-bar.el (menu-bar-make-mm-toggle, menu-bar-make-toggle): Construct menu-item directly. * cedet/ede/base.el (ede-with-projectfile): Use backquote forms.
* calc-mode.el (calc-set-simplify-mode): Use `cond' instead of nested `if's.Jay Belanger2012-08-011-5/+5
|
* calc-mode.el (calc-set-simplify-mode): Adjust message.Jay Belanger2012-07-311-1/+1
|
* calc-mode.el (calc-basic-simplification-mode): Rename fromJay Belanger2012-07-315-16/+23
| | | | | | | | | | | | | `calc-limited-simplification-mode'. (calc-alg-simplification-mode): New function. calc.el (calc-set-mode-line): Adjust mode line display for basic simplification mode. calc-help.el (calc-m-prefix-help): Update help message. calc-ext.el (calc-init-extensions): Add bindings and autoloads for `calc-basic-simplify-mode' and `calc-alg-simplify-mode'.
* calc/calc-mode.el (calc-alg-simplify-mode): Remove function.Jay Belanger2012-07-292-3/+3
| | | | | | (calc-limited-simplify-mode): Renamed from calc-lim-simplify-mode. calc/calc-ext.el (calc-init-extensions): Fix bindings for `calc-limited-simplify-mode'.
* calc/calc-help (calc-m-prefix-help): Change message.Jay Belanger2012-07-291-1/+1
|
* calc/calc.el (calc-simplify-mode): Make 'alg the default value.Jay Belanger2012-07-294-14/+23
| | | | | | | | | | | | | | (calc-set-mode-line): Don't display "AlgSimp ". calc/calc-mode.el (calc-alg-simplify-mode): Remove function. (calc-lim-simplify-mode): New function. (calc-set-simplify-mode): Default to 'alg. (calc-default-simplify-mode): Make algebraic simplifications the default. calc/calc-ext.el (calc-init-extensions): Remove binding for `calc-alg-simplify-mode'. Add binding for `calc-lim-simplify-mode'. calc/README: Mention new default simplification mode.
* calc/calc.el (math-normalize-error): New variable.Jay Belanger2012-07-292-4/+19
| | | | | | | (math-normalize): Set `math-normalize-error' to t when there's an error. calc/calc-alg.el (math-simplify): Don't simplify when `math-normalize' returns an error.
* calccomp.el (math-compose-expr): Undo previous change.Jay Belanger2012-07-271-2/+1
|
* calccomp.el (math-compose-expr): Use parentheses whenJay Belanger2012-07-261-1/+2
| | | | there is a product in the denominator of a fraction.
* Autoload more carefully from Lisp. Follow aliases for function properties.Stefan Monnier2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/subr.el (autoloadp): New function. (symbol-file): Use it. (function-get): New function. * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Use function-get and autoload-do-load. * lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-syntactic-face-function) (lisp-indent-function): * lisp/emacs-lisp/gv.el (gv-get): * lisp/emacs-lisp/edebug.el (get-edebug-spec, edebug-basic-spec): * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): * lisp/emacs-lisp/autoload.el (make-autoload, autoload-print-form): Use function-get. * lisp/emacs-lisp/cl.el: Don't propagate function properties any more. * src/eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp, add argument, tune behavior, and adjust all callers. * lisp/speedbar.el (speedbar-add-localized-speedbar-support): * lisp/emacs-lisp/disass.el (disassemble-internal): * lisp/desktop.el (desktop-load-file): * lisp/help-fns.el (help-function-arglist, find-lisp-object-file-name) (describe-function-1): * lisp/emacs-lisp/find-func.el (find-function-noselect): * lisp/emacs-lisp/elp.el (elp-instrument-function): * lisp/emacs-lisp/advice.el (ad-has-proper-definition): * lisp/apropos.el (apropos-safe-documentation, apropos-macrop): * lisp/emacs-lisp/debug.el (debug-on-entry): * lisp/emacs-lisp/cl-macs.el (cl-compiler-macroexpand): * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): * lisp/calc/calc.el (name): Use autoloadp & autoload-do-load.
* calc-alg.el (math-simplify-divide): Don't cross multiply Jay Belanger2012-07-241-1/+4
| | | | in an equation when the lhs is a variable.
* * calc/calc-units.el (math-consistent-units-p): Accept unit systemsJay Belanger2012-05-191-3/+6
| | | | as consistent units.
* * calc/calc-units.el (calc-quick-units): Use the proper units expression.Jay Belanger2012-05-181-1/+1
|
* * calc/calc-units.el (calc-ensure-consistent-units): Declare.Jay Belanger2012-05-181-0/+2
|
* * calc/calc.el (calc-ensure-consistent-units): New variable.Jay Belanger2012-05-182-3/+26
| | | | | | | | | | | | * calc/calc-units.el (math-consistent-units-p, math-check-unit-consistency): New functions. (calc-quick-units, calc-convert-units): Use `math-check-unit-consistency' when `calc-ensure-consistent-units' is non-nil. (calc-extract-units): Fix typo. * doc/misc/calc.texi (Basic Operations on Units, Customizing Calc): Mention `calc-ensure-consistent-units'.
* calc/calc-lang.el (math-C-parse-bess, math-C-parse-fma): New functions.RĂ¼diger Sonderfeld2012-05-181-2/+33
| | | | (math-function-table): Add support for more C functions.
* Fix minor Y10k bugs.Paul Eggert2012-05-031-1/+1
| | | | | | | | | | | | * lisp/arc-mode.el (archive-unixdate): * lisp/autoinsert.el (auto-insert-alist): * lisp/calc/calc-forms.el (math-this-year): * lisp/gnus/nnweb.el (nnweb-google-parse-1): * lisp/emacs-lisp/copyright.el (copyright-current-year) (copyright-update-year, copyright): * lisp/tar-mode.el (tar-clip-time-string): * lisp/time.el (display-time-update): Don't assume years have 4 digits.