diff options
| author | Michael Albinus | 2021-02-19 10:03:32 +0100 |
|---|---|---|
| committer | Michael Albinus | 2021-02-19 10:03:32 +0100 |
| commit | ea2f5f3fdac0b360833586ac855248094baf328c (patch) | |
| tree | c4d34e2556826340dc692efb2d70906c74d7a1d1 | |
| parent | a9b49dc31159283c962da61a259254b512e63ace (diff) | |
| parent | 9b944f48c9ce65bad50e7c6a957200c0f2d4f1a8 (diff) | |
| download | emacs-ea2f5f3fdac0b360833586ac855248094baf328c.tar.gz emacs-ea2f5f3fdac0b360833586ac855248094baf328c.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
| -rw-r--r-- | lisp/calculator.el | 62 | ||||
| -rw-r--r-- | lisp/plstore.el | 3 |
2 files changed, 22 insertions, 43 deletions
diff --git a/lisp/calculator.el b/lisp/calculator.el index b4c00753e91..00883989b29 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el | |||
| @@ -20,23 +20,18 @@ | |||
| 20 | ;; You should have received a copy of the GNU General Public License | 20 | ;; You should have received a copy of the GNU General Public License |
| 21 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | 21 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. |
| 22 | 22 | ||
| 23 | ;;;===================================================================== | ||
| 24 | ;;; Commentary: | 23 | ;;; Commentary: |
| 25 | ;; | 24 | |
| 26 | ;; A calculator for Emacs. | 25 | ;; A calculator for Emacs. |
| 27 | ;; Why should you reach for your mouse to get xcalc (calc.exe, gcalc or | 26 | ;; Why should you reach for your mouse to get xcalc (calc.exe, gcalc or |
| 28 | ;; whatever), when you have Emacs running already? | 27 | ;; whatever), when you have Emacs running already? |
| 29 | ;; | 28 | ;; |
| 30 | ;; If this is not part of your Emacs distribution, then simply bind | 29 | ;; You can bind this to a key by adding this to your Init file: |
| 31 | ;; `calculator' to a key and make it an autoloaded function, e.g.: | 30 | ;; |
| 32 | ;; (autoload 'calculator "calculator" | ||
| 33 | ;; "Run the Emacs calculator." t) | ||
| 34 | ;; (global-set-key [(control return)] 'calculator) | 31 | ;; (global-set-key [(control return)] 'calculator) |
| 35 | ;; | 32 | ;; |
| 36 | ;; Written by Eli Barzilay, eli@barzilay.org | 33 | ;; Written by Eli Barzilay, eli@barzilay.org |
| 37 | ;; | ||
| 38 | 34 | ||
| 39 | ;;;===================================================================== | ||
| 40 | ;;; Customization: | 35 | ;;; Customization: |
| 41 | 36 | ||
| 42 | (defgroup calculator nil | 37 | (defgroup calculator nil |
| @@ -50,19 +45,16 @@ | |||
| 50 | "Run `calculator' electrically, in the echo area. | 45 | "Run `calculator' electrically, in the echo area. |
| 51 | Electric mode saves some place but changes the way you interact with the | 46 | Electric mode saves some place but changes the way you interact with the |
| 52 | calculator." | 47 | calculator." |
| 53 | :type 'boolean | 48 | :type 'boolean) |
| 54 | :group 'calculator) | ||
| 55 | 49 | ||
| 56 | (defcustom calculator-use-menu t | 50 | (defcustom calculator-use-menu t |
| 57 | "Make `calculator' create a menu. | 51 | "Make `calculator' create a menu. |
| 58 | Note that this requires easymenu. Must be set before loading." | 52 | Note that this requires easymenu. Must be set before loading." |
| 59 | :type 'boolean | 53 | :type 'boolean) |
| 60 | :group 'calculator) | ||
| 61 | 54 | ||
| 62 | (defcustom calculator-bind-escape nil | 55 | (defcustom calculator-bind-escape nil |
| 63 | "If non-nil, set escape to exit the calculator." | 56 | "If non-nil, set escape to exit the calculator." |
| 64 | :type 'boolean | 57 | :type 'boolean) |
| 65 | :group 'calculator) | ||
| 66 | 58 | ||
| 67 | (defcustom calculator-unary-style 'postfix | 59 | (defcustom calculator-unary-style 'postfix |
| 68 | "Value is either `prefix' or `postfix'. | 60 | "Value is either `prefix' or `postfix'. |
| @@ -75,44 +67,38 @@ This determines the default behavior of unary operators." | |||
| 75 | It should contain a \"%s\" somewhere that will indicate the i/o radixes; | 67 | It should contain a \"%s\" somewhere that will indicate the i/o radixes; |
| 76 | this will be a two-character string as described in the documentation | 68 | this will be a two-character string as described in the documentation |
| 77 | for `calculator-mode'." | 69 | for `calculator-mode'." |
| 78 | :type 'string | 70 | :type 'string) |
| 79 | :group 'calculator) | ||
| 80 | 71 | ||
| 81 | (defcustom calculator-number-digits 3 | 72 | (defcustom calculator-number-digits 3 |
| 82 | "The calculator's number of digits used for standard display. | 73 | "The calculator's number of digits used for standard display. |
| 83 | Used by the `calculator-standard-display' function - it will use the | 74 | Used by the `calculator-standard-display' function - it will use the |
| 84 | format string \"%.NC\" where this number is N and C is a character given | 75 | format string \"%.NC\" where this number is N and C is a character given |
| 85 | at runtime." | 76 | at runtime." |
| 86 | :type 'integer | 77 | :type 'integer) |
| 87 | :group 'calculator) | ||
| 88 | 78 | ||
| 89 | (defcustom calculator-radix-grouping-mode t | 79 | (defcustom calculator-radix-grouping-mode t |
| 90 | "Use digit grouping in radix output mode. | 80 | "Use digit grouping in radix output mode. |
| 91 | If this is set, chunks of `calculator-radix-grouping-digits' characters | 81 | If this is set, chunks of `calculator-radix-grouping-digits' characters |
| 92 | will be separated by `calculator-radix-grouping-separator' when in radix | 82 | will be separated by `calculator-radix-grouping-separator' when in radix |
| 93 | output mode is active (determined by `calculator-output-radix')." | 83 | output mode is active (determined by `calculator-output-radix')." |
| 94 | :type 'boolean | 84 | :type 'boolean) |
| 95 | :group 'calculator) | ||
| 96 | 85 | ||
| 97 | (defcustom calculator-radix-grouping-digits 4 | 86 | (defcustom calculator-radix-grouping-digits 4 |
| 98 | "The number of digits used for grouping display in radix modes. | 87 | "The number of digits used for grouping display in radix modes. |
| 99 | See `calculator-radix-grouping-mode'." | 88 | See `calculator-radix-grouping-mode'." |
| 100 | :type 'integer | 89 | :type 'integer) |
| 101 | :group 'calculator) | ||
| 102 | 90 | ||
| 103 | (defcustom calculator-radix-grouping-separator "'" | 91 | (defcustom calculator-radix-grouping-separator "'" |
| 104 | "The separator used in radix grouping display. | 92 | "The separator used in radix grouping display. |
| 105 | See `calculator-radix-grouping-mode'." | 93 | See `calculator-radix-grouping-mode'." |
| 106 | :type 'string | 94 | :type 'string) |
| 107 | :group 'calculator) | ||
| 108 | 95 | ||
| 109 | (defcustom calculator-remove-zeros t | 96 | (defcustom calculator-remove-zeros t |
| 110 | "Non-nil value means delete all redundant zero decimal digits. | 97 | "Non-nil value means delete all redundant zero decimal digits. |
| 111 | If this value is not t and not nil, redundant zeros are removed except | 98 | If this value is not t and not nil, redundant zeros are removed except |
| 112 | for one. | 99 | for one. |
| 113 | Used by the `calculator-remove-zeros' function." | 100 | Used by the `calculator-remove-zeros' function." |
| 114 | :type '(choice (const t) (const leave-decimal) (const nil)) | 101 | :type '(choice (const t) (const leave-decimal) (const nil))) |
| 115 | :group 'calculator) | ||
| 116 | 102 | ||
| 117 | (defcustom calculator-displayer '(std ?n) | 103 | (defcustom calculator-displayer '(std ?n) |
| 118 | "A displayer specification for numerical values. | 104 | "A displayer specification for numerical values. |
| @@ -135,8 +121,7 @@ a character and G is an optional boolean, in this case the | |||
| 135 | arguments." | 121 | arguments." |
| 136 | :type '(choice (function) (string) (sexp) | 122 | :type '(choice (function) (string) (sexp) |
| 137 | (list (const std) character) | 123 | (list (const std) character) |
| 138 | (list (const std) character boolean)) | 124 | (list (const std) character boolean))) |
| 139 | :group 'calculator) | ||
| 140 | 125 | ||
| 141 | (defcustom calculator-displayers | 126 | (defcustom calculator-displayers |
| 142 | '(((std ?n) "Standard display, decimal point or scientific") | 127 | '(((std ?n) "Standard display, decimal point or scientific") |
| @@ -152,15 +137,13 @@ specification is the same as the values that can be stored in | |||
| 152 | `calculator-displayer'. | 137 | `calculator-displayer'. |
| 153 | 138 | ||
| 154 | `calculator-rotate-displayer' rotates this list." | 139 | `calculator-rotate-displayer' rotates this list." |
| 155 | :type 'sexp | 140 | :type 'sexp) |
| 156 | :group 'calculator) | ||
| 157 | 141 | ||
| 158 | (defcustom calculator-paste-decimals t | 142 | (defcustom calculator-paste-decimals t |
| 159 | "If non-nil, convert pasted integers so they have a decimal point. | 143 | "If non-nil, convert pasted integers so they have a decimal point. |
| 160 | This makes it possible to paste big integers since they will be read as | 144 | This makes it possible to paste big integers since they will be read as |
| 161 | floats, otherwise the Emacs reader will fail on them." | 145 | floats, otherwise the Emacs reader will fail on them." |
| 162 | :type 'boolean | 146 | :type 'boolean) |
| 163 | :group 'calculator) | ||
| 164 | (make-obsolete-variable 'calculator-paste-decimals | 147 | (make-obsolete-variable 'calculator-paste-decimals |
| 165 | "it is no longer used." "26.1") | 148 | "it is no longer used." "26.1") |
| 166 | 149 | ||
| @@ -169,14 +152,12 @@ floats, otherwise the Emacs reader will fail on them." | |||
| 169 | `calculator-displayer', to format a string before copying it with | 152 | `calculator-displayer', to format a string before copying it with |
| 170 | `calculator-copy'. If nil, then `calculator-displayer's normal value is | 153 | `calculator-copy'. If nil, then `calculator-displayer's normal value is |
| 171 | used." | 154 | used." |
| 172 | :type 'boolean | 155 | :type 'boolean) |
| 173 | :group 'calculator) | ||
| 174 | 156 | ||
| 175 | (defcustom calculator-2s-complement nil | 157 | (defcustom calculator-2s-complement nil |
| 176 | "If non-nil, show negative numbers in 2s complement in radix modes. | 158 | "If non-nil, show negative numbers in 2s complement in radix modes. |
| 177 | Otherwise show as a negative number." | 159 | Otherwise show as a negative number." |
| 178 | :type 'boolean | 160 | :type 'boolean) |
| 179 | :group 'calculator) | ||
| 180 | 161 | ||
| 181 | (defcustom calculator-mode-hook nil | 162 | (defcustom calculator-mode-hook nil |
| 182 | "List of hook functions for `calculator-mode' to run. | 163 | "List of hook functions for `calculator-mode' to run. |
| @@ -184,8 +165,7 @@ Note: if `calculator-electric-mode' is on, then this hook will get | |||
| 184 | activated in the minibuffer -- in that case it should not do much more | 165 | activated in the minibuffer -- in that case it should not do much more |
| 185 | than local key settings and other effects that will change things | 166 | than local key settings and other effects that will change things |
| 186 | outside the scope of calculator related code." | 167 | outside the scope of calculator related code." |
| 187 | :type 'hook | 168 | :type 'hook) |
| 188 | :group 'calculator) | ||
| 189 | 169 | ||
| 190 | (defcustom calculator-user-registers nil | 170 | (defcustom calculator-user-registers nil |
| 191 | "An association list of user-defined register bindings. | 171 | "An association list of user-defined register bindings. |
| @@ -200,8 +180,7 @@ before you load calculator." | |||
| 200 | (when (boundp 'calculator-registers) | 180 | (when (boundp 'calculator-registers) |
| 201 | (setq calculator-registers | 181 | (setq calculator-registers |
| 202 | (append val calculator-registers))) | 182 | (append val calculator-registers))) |
| 203 | (setq calculator-user-registers val)) | 183 | (setq calculator-user-registers val))) |
| 204 | :group 'calculator) | ||
| 205 | 184 | ||
| 206 | (defcustom calculator-user-operators nil | 185 | (defcustom calculator-user-operators nil |
| 207 | "A list of additional operators. | 186 | "A list of additional operators. |
| @@ -234,8 +213,7 @@ Examples: | |||
| 234 | 213 | ||
| 235 | Note that this will be either postfix or prefix, according to | 214 | Note that this will be either postfix or prefix, according to |
| 236 | `calculator-unary-style'." | 215 | `calculator-unary-style'." |
| 237 | :type '(repeat (list string symbol sexp integer integer)) | 216 | :type '(repeat (list string symbol sexp integer integer))) |
| 238 | :group 'calculator) | ||
| 239 | 217 | ||
| 240 | ;;;===================================================================== | 218 | ;;;===================================================================== |
| 241 | ;;; Code: | 219 | ;;; Code: |
diff --git a/lisp/plstore.el b/lisp/plstore.el index 46533664d52..4ca5886bf15 100644 --- a/lisp/plstore.el +++ b/lisp/plstore.el | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | ;;; plstore.el --- secure plist store -*- lexical-binding: t -*- | 1 | ;;; plstore.el --- secure plist store -*- lexical-binding: t -*- |
| 2 | |||
| 2 | ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2021 Free Software Foundation, Inc. |
| 3 | 4 | ||
| 4 | ;; Author: Daiki Ueno <ueno@gnu.org> | 5 | ;; Author: Daiki Ueno <ueno@gnu.org> |
| @@ -19,7 +20,7 @@ | |||
| 19 | ;; You should have received a copy of the GNU General Public License | 20 | ;; You should have received a copy of the GNU General Public License |
| 20 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | 21 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. |
| 21 | 22 | ||
| 22 | ;;; Commentary | 23 | ;;; Commentary: |
| 23 | 24 | ||
| 24 | ;; Plist based data store providing search and partial encryption. | 25 | ;; Plist based data store providing search and partial encryption. |
| 25 | ;; | 26 | ;; |