aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2020-05-03 07:50:21 -0700
committerGlenn Morris2020-05-03 07:50:21 -0700
commit76cf14f9ca312d6862515d7b9dc12c878eaa1d6b (patch)
treecdc2c5a0435c7c9a3e027a1bc41c35e2f66c8f04
parentf696dc883f332da27d6385a683c201e569b6da16 (diff)
parent1d477a0fec2b31101960a75702d8ae1c99ed21e1 (diff)
downloademacs-76cf14f9ca312d6862515d7b9dc12c878eaa1d6b.tar.gz
emacs-76cf14f9ca312d6862515d7b9dc12c878eaa1d6b.zip
Merge from origin/emacs-27
1d477a0fec Recommend to avoid unnecessary abbreviations in doc aea1b4db72 Revert "Fix calculator division truncation (bug#40892)"
-rw-r--r--doc/lispref/tips.texi8
-rw-r--r--lisp/calculator.el2
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 3b8da35b6cc..5b09b2ccea6 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -821,6 +821,14 @@ most cases, the meaning is clear with just ``if''. Otherwise, try to
821find an alternate phrasing that conveys the meaning. 821find an alternate phrasing that conveys the meaning.
822 822
823@item 823@item
824Try to avoid using abbreviations such as ``e.g.'' (for ``for
825example''), ``i.e.'' (for ``that is''), ``no.'' (for ``number''),
826``c.f.'' (for ``in contrast to'') and ``w.r.t.'' (for ``with respect
827to'') as much as possible. It is almost always clearer and easier to
828read the expanded version.@footnote{We do use these occasionally, but
829try not to overdo it.}
830
831@item
824When a command is meaningful only in a certain mode or situation, 832When a command is meaningful only in a certain mode or situation,
825do mention that in the documentation string. For example, 833do mention that in the documentation string. For example,
826the documentation of @code{dired-find-file} is: 834the documentation of @code{dired-find-file} is:
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 7e0b2fcc6a3..6996990814d 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -864,7 +864,7 @@ The result should not exceed the screen width."
864 "\\.\\([^0-9].*\\)?$" ".0\\1" str)) 864 "\\.\\([^0-9].*\\)?$" ".0\\1" str))
865 (str (replace-regexp-in-string 865 (str (replace-regexp-in-string
866 "[eE][+-]?\\([^0-9].*\\)?$" "e0\\1" str))) 866 "[eE][+-]?\\([^0-9].*\\)?$" "e0\\1" str)))
867 (float (string-to-number str))))) 867 (string-to-number str))))
868 868
869(defun calculator-push-curnum () 869(defun calculator-push-curnum ()
870 "Push the numeric value of the displayed number to the stack." 870 "Push the numeric value of the displayed number to the stack."