Mercurial > emacs
annotate lisp/calc/calc-yank.el @ 94654:6c9af2bfcfee
Switch to recommended form of GPLv3 permissions notice.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 06 May 2008 03:16:00 +0000 |
parents | c6152337e4ad |
children | b39025681d99 |
rev | line source |
---|---|
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
1 ;;; calc-yank.el --- kill-ring functionality for Calc |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
2 |
64325
1db49616ce05
Update copyright information.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
62748
diff
changeset
|
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, |
79702 | 4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
5 |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
6 ;; Author: David Gillespie <daveg@synaptics.com> |
77465
1154f082efd9
Update maintainer's address.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
76595
diff
changeset
|
7 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> |
40785 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
94654
6c9af2bfcfee
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93880
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
76595
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
94654
6c9af2bfcfee
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93880
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
6c9af2bfcfee
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93880
diff
changeset
|
14 ;; (at your option) any later version. |
40785 | 15 |
76595
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
19 ;; GNU General Public License for more details. |
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
20 |
497d17a80bb8
Change form of license text to match rest of Emacs.
Glenn Morris <rgm@gnu.org>
parents:
75346
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
94654
6c9af2bfcfee
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93880
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
40785 | 23 |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
24 ;;; Commentary: |
40785 | 25 |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
26 ;;; Code: |
40785 | 27 |
28 ;; This file is autoloaded from calc-ext.el. | |
58679
9a7f5565091f
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58545
diff
changeset
|
29 |
40785 | 30 (require 'calc-ext) |
31 (require 'calc-macs) | |
32 | |
33 ;;; Kill ring commands. | |
34 | |
35 (defun calc-kill (nn &optional no-delete) | |
36 (interactive "P") | |
37 (if (eq major-mode 'calc-mode) | |
38 (calc-wrapper | |
39 (calc-force-refresh) | |
40 (calc-set-command-flag 'no-align) | |
41 (let ((num (max (calc-locate-cursor-element (point)) 1)) | |
42 (n (prefix-numeric-value nn))) | |
43 (if (< n 0) | |
44 (progn | |
45 (if (eobp) | |
46 (setq num (1- num))) | |
47 (setq num (- num n) | |
48 n (- n)))) | |
49 (let ((stuff (calc-top-list n (- num n -1)))) | |
50 (calc-cursor-stack-index num) | |
51 (let ((first (point))) | |
52 (calc-cursor-stack-index (- num n)) | |
53 (if (null nn) | |
54 (backward-char 1)) ; don't include newline for raw C-k | |
55 (copy-region-as-kill first (point)) | |
56 (if (not no-delete) | |
57 (calc-pop-stack n (- num n -1)))) | |
58 (setq calc-last-kill (cons (car kill-ring) stuff))))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
59 (kill-line nn))) |
40785 | 60 |
61 (defun calc-force-refresh () | |
62 (if (or calc-executing-macro calc-display-dirty) | |
63 (let ((calc-executing-macro nil)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
64 (calc-refresh)))) |
40785 | 65 |
66 (defun calc-locate-cursor-element (pt) | |
67 (save-excursion | |
68 (goto-char (point-max)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
69 (calc-locate-cursor-scan (- calc-stack-top) calc-stack pt))) |
40785 | 70 |
71 (defun calc-locate-cursor-scan (n stack pt) | |
72 (if (or (<= (point) pt) | |
73 (null stack)) | |
74 n | |
75 (forward-line (- (nth 1 (car stack)))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
76 (calc-locate-cursor-scan (1+ n) (cdr stack) pt))) |
40785 | 77 |
78 (defun calc-kill-region (top bot &optional no-delete) | |
79 (interactive "r") | |
80 (if (eq major-mode 'calc-mode) | |
81 (calc-wrapper | |
82 (calc-force-refresh) | |
83 (calc-set-command-flag 'no-align) | |
84 (let* ((top-num (calc-locate-cursor-element top)) | |
85 (bot-num (calc-locate-cursor-element (1- bot))) | |
86 (num (- top-num bot-num -1))) | |
87 (copy-region-as-kill top bot) | |
88 (setq calc-last-kill (cons (car kill-ring) | |
89 (calc-top-list num bot-num))) | |
90 (if (not no-delete) | |
91 (calc-pop-stack num bot-num)))) | |
92 (if no-delete | |
93 (copy-region-as-kill top bot) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
94 (kill-region top bot)))) |
40785 | 95 |
96 (defun calc-copy-as-kill (n) | |
97 (interactive "P") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
98 (calc-kill n t)) |
40785 | 99 |
100 (defun calc-copy-region-as-kill (top bot) | |
101 (interactive "r") | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
102 (calc-kill-region top bot t)) |
40785 | 103 |
93880
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
104 ;; This function uses calc-last-kill if possible to get an exact result, |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
105 ;; otherwise it just parses the yanked string. |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
106 ;; Modified to use Emacs 19 extended concept of kill-ring. -- daveg 12/15/96 |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
107 ;;;###autoload |
40785 | 108 (defun calc-yank () |
109 (interactive) | |
110 (calc-wrapper | |
111 (calc-pop-push-record-list | |
112 0 "yank" | |
113 (let ((thing (if (fboundp 'current-kill) | |
114 (current-kill 0 t) | |
115 (car kill-ring-yank-pointer)))) | |
116 (if (eq (car-safe calc-last-kill) thing) | |
117 (cdr calc-last-kill) | |
118 (if (stringp thing) | |
119 (let ((val (math-read-exprs (calc-clean-newlines thing)))) | |
120 (if (eq (car-safe val) 'error) | |
121 (progn | |
122 (setq val (math-read-exprs thing)) | |
123 (if (eq (car-safe val) 'error) | |
124 (error "Bad format in yanked data") | |
125 val)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
126 val)))))))) |
40785 | 127 |
128 (defun calc-clean-newlines (s) | |
129 (cond | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49263
diff
changeset
|
130 |
40785 | 131 ;; Omit leading/trailing whitespace |
132 ((or (string-match "\\`[ \n\r]+\\([^\001]*\\)\\'" s) | |
133 (string-match "\\`\\([^\001]*\\)[ \n\r]+\\'" s)) | |
134 (calc-clean-newlines (math-match-substring s 1))) | |
135 | |
136 ;; Convert newlines to commas | |
137 ((string-match "\\`\\(.*\\)[\n\r]+\\([^\001]*\\)\\'" s) | |
138 (calc-clean-newlines (concat (math-match-substring s 1) "," | |
139 (math-match-substring s 2)))) | |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49263
diff
changeset
|
140 |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
141 (t s))) |
40785 | 142 |
143 | |
144 (defun calc-do-grab-region (top bot arg) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
145 (when (memq major-mode '(calc-mode calc-trail-mode)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
146 (error "This command works only in a regular text buffer")) |
40785 | 147 (let* ((from-buffer (current-buffer)) |
148 (calc-was-started (get-buffer-window "*Calculator*")) | |
149 (single nil) | |
150 data vals pos) | |
151 (if arg | |
152 (if (consp arg) | |
153 (setq single t) | |
154 (setq arg (prefix-numeric-value arg)) | |
155 (if (= arg 0) | |
156 (save-excursion | |
157 (beginning-of-line) | |
158 (setq top (point)) | |
159 (end-of-line) | |
160 (setq bot (point))) | |
161 (save-excursion | |
162 (setq top (point)) | |
163 (forward-line arg) | |
164 (if (> arg 0) | |
165 (setq bot (point)) | |
166 (setq bot top | |
167 top (point))))))) | |
168 (setq data (buffer-substring top bot)) | |
169 (calc) | |
170 (if single | |
171 (setq vals (math-read-expr data)) | |
172 (setq vals (math-read-expr (concat "[" data "]"))) | |
173 (and (eq (car-safe vals) 'vec) | |
174 (= (length vals) 2) | |
175 (eq (car-safe (nth 1 vals)) 'vec) | |
176 (setq vals (nth 1 vals)))) | |
177 (if (eq (car-safe vals) 'error) | |
178 (progn | |
179 (if calc-was-started | |
180 (pop-to-buffer from-buffer) | |
181 (calc-quit t) | |
182 (switch-to-buffer from-buffer)) | |
183 (goto-char top) | |
184 (forward-char (+ (nth 1 vals) (if single 0 1))) | |
185 (error (nth 2 vals)))) | |
186 (calc-slow-wrapper | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
187 (calc-enter-result 0 "grab" vals)))) |
40785 | 188 |
189 | |
190 (defun calc-do-grab-rectangle (top bot arg &optional reduce) | |
191 (and (memq major-mode '(calc-mode calc-trail-mode)) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
192 (error "This command works only in a regular text buffer")) |
40785 | 193 (let* ((col1 (save-excursion (goto-char top) (current-column))) |
194 (col2 (save-excursion (goto-char bot) (current-column))) | |
195 (from-buffer (current-buffer)) | |
196 (calc-was-started (get-buffer-window "*Calculator*")) | |
197 data mat vals lnum pt pos) | |
198 (if (= col1 col2) | |
199 (save-excursion | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
200 (unless (= col1 0) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
201 (error "Point and mark must be at beginning of line, or define a rectangle")) |
40785 | 202 (goto-char top) |
203 (while (< (point) bot) | |
204 (setq pt (point)) | |
205 (forward-line 1) | |
206 (setq data (cons (buffer-substring pt (1- (point))) data))) | |
207 (setq data (nreverse data))) | |
208 (setq data (extract-rectangle top bot))) | |
209 (calc) | |
210 (setq mat (list 'vec) | |
211 lnum 0) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
212 (when arg |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
213 (setq arg (if (consp arg) 0 (prefix-numeric-value arg)))) |
40785 | 214 (while data |
215 (if (natnump arg) | |
216 (progn | |
217 (if (= arg 0) | |
218 (setq arg 1000000)) | |
219 (setq pos 0 | |
220 vals (list 'vec)) | |
221 (let ((w (length (car data))) | |
222 j v) | |
223 (while (< pos w) | |
224 (setq j (+ pos arg) | |
225 v (if (>= j w) | |
226 (math-read-expr (substring (car data) pos)) | |
227 (math-read-expr (substring (car data) pos j)))) | |
228 (if (eq (car-safe v) 'error) | |
229 (setq vals v w 0) | |
230 (setq vals (nconc vals (list v)) | |
231 pos j))))) | |
232 (if (string-match "\\` *-?[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]? *\\'" | |
233 (car data)) | |
62039
a17f83f2c421
(calc-do-grab-rectangle): Replace string-to-int by string-to-number.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
61883
diff
changeset
|
234 (setq vals (list 'vec (string-to-number (car data)))) |
40785 | 235 (if (and (null arg) |
236 (string-match "[[{][^][{}]*[]}]" (car data))) | |
237 (setq pos (match-beginning 0) | |
238 vals (math-read-expr (math-match-substring (car data) 0))) | |
239 (let ((s (if (string-match | |
240 "\\`\\([0-9]+:[ \t]\\)?\\(.*[^, \t]\\)[, \t]*\\'" | |
241 (car data)) | |
242 (math-match-substring (car data) 2) | |
243 (car data)))) | |
244 (setq pos -1 | |
245 vals (math-read-expr (concat "[" s "]"))) | |
246 (if (eq (car-safe vals) 'error) | |
247 (let ((v2 (math-read-expr s))) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
248 (unless (eq (car-safe v2) 'error) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
249 (setq vals (list 'vec v2))))))))) |
40785 | 250 (if (eq (car-safe vals) 'error) |
251 (progn | |
252 (if calc-was-started | |
253 (pop-to-buffer from-buffer) | |
254 (calc-quit t) | |
255 (switch-to-buffer from-buffer)) | |
256 (goto-char top) | |
257 (forward-line lnum) | |
258 (forward-char (+ (nth 1 vals) (min col1 col2) pos)) | |
259 (error (nth 2 vals)))) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
260 (unless (equal vals '(vec)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
261 (setq mat (cons vals mat))) |
40785 | 262 (setq data (cdr data) |
263 lnum (1+ lnum))) | |
264 (calc-slow-wrapper | |
265 (if reduce | |
266 (calc-enter-result 0 "grb+" (list reduce '(var add var-add) | |
267 (nreverse mat))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
268 (calc-enter-result 0 "grab" (nreverse mat)))))) |
40785 | 269 |
270 | |
271 (defun calc-copy-to-buffer (nn) | |
272 "Copy the top of stack into an editing buffer." | |
273 (interactive "P") | |
274 (let ((thebuf (and (not (memq major-mode '(calc-mode calc-trail-mode))) | |
275 (current-buffer))) | |
276 (movept nil) | |
277 oldbuf newbuf) | |
278 (calc-wrapper | |
279 (save-excursion | |
280 (calc-force-refresh) | |
281 (let ((n (prefix-numeric-value nn)) | |
282 (eat-lnums calc-line-numbering) | |
283 (big-offset (if (eq calc-language 'big) 1 0)) | |
284 top bot) | |
285 (setq oldbuf (current-buffer) | |
286 newbuf (or thebuf | |
287 (calc-find-writable-buffer (buffer-list) 0) | |
288 (calc-find-writable-buffer (buffer-list) 1) | |
289 (error "No other buffer"))) | |
290 (cond ((and (or (null nn) | |
291 (consp nn)) | |
292 (= (calc-substack-height 0) | |
293 (- (1- (calc-substack-height 1)) big-offset))) | |
294 (calc-cursor-stack-index 1) | |
295 (if (looking-at | |
296 (if calc-line-numbering "[0-9]+: *[^ \n]" " *[^ \n]")) | |
297 (goto-char (1- (match-end 0)))) | |
298 (setq eat-lnums nil | |
299 top (point)) | |
300 (calc-cursor-stack-index 0) | |
301 (setq bot (- (1- (point)) big-offset))) | |
302 ((> n 0) | |
303 (calc-cursor-stack-index n) | |
304 (setq top (point)) | |
305 (calc-cursor-stack-index 0) | |
306 (setq bot (- (point) big-offset))) | |
307 ((< n 0) | |
308 (calc-cursor-stack-index (- n)) | |
309 (setq top (point)) | |
310 (calc-cursor-stack-index (1- (- n))) | |
311 (setq bot (point))) | |
312 (t | |
313 (goto-char (point-min)) | |
314 (forward-line 1) | |
315 (setq top (point)) | |
316 (calc-cursor-stack-index 0) | |
317 (setq bot (point)))) | |
318 (save-excursion | |
319 (set-buffer newbuf) | |
320 (if (consp nn) | |
321 (kill-region (region-beginning) (region-end))) | |
322 (push-mark (point) t) | |
323 (if (and overwrite-mode (not (consp nn))) | |
324 (calc-overwrite-string (save-excursion | |
325 (set-buffer oldbuf) | |
326 (buffer-substring top bot)) | |
327 eat-lnums) | |
328 (or (bolp) (setq eat-lnums nil)) | |
329 (insert-buffer-substring oldbuf top bot) | |
330 (and eat-lnums | |
331 (let ((n 1)) | |
332 (while (and (> (point) (mark)) | |
333 (progn | |
334 (forward-line -1) | |
335 (>= (point) (mark)))) | |
336 (delete-char 4) | |
337 (setq n (1+ n))) | |
338 (forward-line n)))) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
339 (when thebuf |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
340 (setq movept (point))) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
341 (when (get-buffer-window (current-buffer)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
342 (set-window-point (get-buffer-window (current-buffer)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
343 (point))))))) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
344 (when movept |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
345 (goto-char movept)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
346 (when (and (consp nn) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
347 (not thebuf)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
348 (calc-quit t) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
349 (switch-to-buffer newbuf)))) |
40785 | 350 |
351 (defun calc-overwrite-string (str eat-lnums) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
352 (when (string-match "\n\\'" str) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
353 (setq str (substring str 0 -1))) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
354 (when eat-lnums |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
355 (setq str (substring str 4))) |
40785 | 356 (if (and (string-match "\\`[-+]?[0-9.]+\\(e-?[0-9]+\\)?\\'" str) |
357 (looking-at "[-+]?[0-9.]+\\(e-?[0-9]+\\)?")) | |
358 (progn | |
359 (delete-region (point) (match-end 0)) | |
360 (insert str)) | |
361 (let ((i 0)) | |
362 (while (< i (length str)) | |
363 (if (= (setq last-command-char (aref str i)) ?\n) | |
364 (or (= i (1- (length str))) | |
365 (let ((pt (point))) | |
366 (end-of-line) | |
367 (delete-region pt (point)) | |
368 (if (eobp) | |
369 (insert "\n") | |
370 (forward-char 1)) | |
371 (if eat-lnums (setq i (+ i 4))))) | |
372 (self-insert-command 1)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
373 (setq i (1+ i)))))) |
40785 | 374 |
93880
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
375 ;; First, require that buffer is visible and does not begin with "*" |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
376 ;; Second, require only that it not begin with "*Calc" |
40785 | 377 (defun calc-find-writable-buffer (buf mode) |
378 (and buf | |
379 (if (or (string-match "\\`\\( .*\\|\\*Calc.*\\)" | |
380 (buffer-name (car buf))) | |
381 (and (= mode 0) | |
382 (or (string-match "\\`\\*.*" (buffer-name (car buf))) | |
383 (not (get-buffer-window (car buf)))))) | |
384 (calc-find-writable-buffer (cdr buf) mode) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
385 (car buf)))) |
40785 | 386 |
387 | |
388 (defun calc-edit (n) | |
389 (interactive "p") | |
390 (calc-slow-wrapper | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
391 (when (eq n 0) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
392 (setq n (calc-stack-size))) |
40785 | 393 (let* ((flag nil) |
394 (allow-ret (> n 1)) | |
395 (list (math-showing-full-precision | |
396 (mapcar (if (> n 1) | |
397 (function (lambda (x) | |
398 (math-format-flat-expr x 0))) | |
399 (function | |
400 (lambda (x) | |
401 (if (math-vectorp x) (setq allow-ret t)) | |
40998
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
402 (math-format-nice-expr x (frame-width))))) |
40785 | 403 (if (> n 0) |
404 (calc-top-list n) | |
405 (calc-top-list 1 (- n))))))) | |
406 (calc-edit-mode (list 'calc-finish-stack-edit (or flag n)) allow-ret) | |
407 (while list | |
408 (insert (car list) "\n") | |
409 (setq list (cdr list))))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
410 (calc-show-edit-buffer)) |
40785 | 411 |
412 (defun calc-alg-edit (str) | |
413 (calc-edit-mode '(calc-finish-stack-edit 0)) | |
414 (calc-show-edit-buffer) | |
415 (insert str "\n") | |
416 (backward-char 1) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
417 (calc-set-command-flag 'do-edit)) |
40785 | 418 |
93880
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
419 (defvar calc-edit-mode-map |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
420 (let ((map (make-sparse-keymap))) |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
421 (define-key map "\n" 'calc-edit-finish) |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
422 (define-key map "\r" 'calc-edit-return) |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
423 (define-key map "\C-c\C-c" 'calc-edit-finish) |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
424 map) |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
425 "Keymap for use by the calc-edit command.") |
40785 | 426 |
58545
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
427 (defvar calc-original-buffer) |
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
428 (defvar calc-return-buffer) |
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
429 (defvar calc-one-window) |
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
430 (defvar calc-edit-handler) |
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
431 (defvar calc-restore-trail) |
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
432 (defvar calc-allow-ret) |
59306
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
433 (defvar calc-edit-top) |
58545
e4aa15831776
(calc-original-buffer, calc-return-buffer, calc-one-window)
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58335
diff
changeset
|
434 |
40785 | 435 (defun calc-edit-mode (&optional handler allow-ret title) |
436 "Calculator editing mode. Press RET, LFD, or C-c C-c to finish. | |
437 To cancel the edit, simply kill the *Calc Edit* buffer." | |
438 (interactive) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
439 (unless handler |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
440 (error "This command can be used only indirectly through calc-edit")) |
40785 | 441 (let ((oldbuf (current-buffer)) |
442 (buf (get-buffer-create "*Calc Edit*"))) | |
443 (set-buffer buf) | |
444 (kill-all-local-variables) | |
445 (use-local-map calc-edit-mode-map) | |
446 (setq buffer-read-only nil) | |
447 (setq truncate-lines nil) | |
448 (setq major-mode 'calc-edit-mode) | |
449 (setq mode-name "Calc Edit") | |
62748
8fd2f1761d1c
(calc-edit-mode): Use run-mode-hooks.
Lute Kamstra <lute@gnu.org>
parents:
62039
diff
changeset
|
450 (run-mode-hooks 'calc-edit-mode-hook) |
40785 | 451 (make-local-variable 'calc-original-buffer) |
452 (setq calc-original-buffer oldbuf) | |
453 (make-local-variable 'calc-return-buffer) | |
454 (setq calc-return-buffer oldbuf) | |
455 (make-local-variable 'calc-one-window) | |
456 (setq calc-one-window (and (one-window-p t) pop-up-windows)) | |
457 (make-local-variable 'calc-edit-handler) | |
458 (setq calc-edit-handler handler) | |
459 (make-local-variable 'calc-restore-trail) | |
460 (setq calc-restore-trail (get-buffer-window (calc-trail-buffer))) | |
461 (make-local-variable 'calc-allow-ret) | |
462 (setq calc-allow-ret allow-ret) | |
59614
b883f279ae24
(calc-edit-mode): Inhibit read-only when erasing buffer.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59306
diff
changeset
|
463 (let ((inhibit-read-only t)) |
b883f279ae24
(calc-edit-mode): Inhibit read-only when erasing buffer.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59306
diff
changeset
|
464 (erase-buffer)) |
59232
6841983190b8
(calc-edit-mode): Mention C-cC-c as the way to finish, C-xk as the way
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58679
diff
changeset
|
465 (add-hook 'kill-buffer-hook (lambda () |
6841983190b8
(calc-edit-mode): Mention C-cC-c as the way to finish, C-xk as the way
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58679
diff
changeset
|
466 (let ((calc-edit-handler nil)) |
6841983190b8
(calc-edit-mode): Mention C-cC-c as the way to finish, C-xk as the way
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58679
diff
changeset
|
467 (calc-edit-finish t)) |
6841983190b8
(calc-edit-mode): Mention C-cC-c as the way to finish, C-xk as the way
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58679
diff
changeset
|
468 (message "(Cancelled)")) t t) |
59305
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
469 (insert (propertize |
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
470 (concat |
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
471 (or title title "Calc Edit Mode. ") |
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
472 "Press `C-c C-c'" |
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
473 (if allow-ret "" " or RET") |
f8fd85fc066a
(calc-edit-mode): Make header in italic.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59302
diff
changeset
|
474 " to finish, `C-x k RET' to cancel.\n\n") |
59306
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
475 'font-lock-face 'italic 'read-only t 'rear-nonsticky t 'front-sticky t)) |
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
476 (make-local-variable 'calc-edit-top) |
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
477 (setq calc-edit-top (point)))) |
40785 | 478 (put 'calc-edit-mode 'mode-class 'special) |
479 | |
480 (defun calc-show-edit-buffer () | |
481 (let ((buf (current-buffer))) | |
482 (if (and (one-window-p t) pop-up-windows) | |
483 (pop-to-buffer (get-buffer-create "*Calc Edit*")) | |
484 (and calc-embedded-info (get-buffer-window (aref calc-embedded-info 1)) | |
485 (select-window (get-buffer-window (aref calc-embedded-info 1)))) | |
486 (switch-to-buffer (get-buffer-create "*Calc Edit*"))) | |
487 (setq calc-return-buffer buf) | |
40998
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
488 (if (and (< (window-width) (frame-width)) |
40785 | 489 calc-display-trail) |
490 (let ((win (get-buffer-window (calc-trail-buffer)))) | |
491 (if win | |
492 (delete-window win)))) | |
493 (set-buffer-modified-p nil) | |
59306
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
494 (goto-char calc-edit-top))) |
40785 | 495 |
496 (defun calc-edit-return () | |
497 (interactive) | |
498 (if (and (boundp 'calc-allow-ret) calc-allow-ret) | |
499 (newline) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
500 (calc-edit-finish))) |
40785 | 501 |
58335
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
502 ;; The variable calc-edit-disp-trail is local to calc-edit finish, but |
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
503 ;; is used by calc-finish-selection-edit and calc-finish-stack-edit. |
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
504 (defvar calc-edit-disp-trail) |
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
505 |
40785 | 506 (defun calc-edit-finish (&optional keep) |
507 "Finish calc-edit mode. Parse buffer contents and push them on the stack." | |
508 (interactive "P") | |
509 (message "Working...") | |
510 (or (and (boundp 'calc-original-buffer) | |
511 (boundp 'calc-return-buffer) | |
512 (boundp 'calc-one-window) | |
513 (boundp 'calc-edit-handler) | |
514 (boundp 'calc-restore-trail) | |
515 (eq major-mode 'calc-edit-mode)) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
516 (error "This command is valid only in buffers created by calc-edit")) |
40785 | 517 (let ((buf (current-buffer)) |
518 (original calc-original-buffer) | |
519 (return calc-return-buffer) | |
520 (one-window calc-one-window) | |
58335
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
521 (calc-edit-disp-trail calc-restore-trail)) |
40785 | 522 (save-excursion |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
523 (when (or (null (buffer-name original)) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
524 (progn |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
525 (set-buffer original) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
526 (not (eq major-mode 'calc-mode)))) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
527 (error "Original calculator buffer has been corrupted"))) |
59306
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
528 (goto-char calc-edit-top) |
40785 | 529 (if (buffer-modified-p) |
530 (eval calc-edit-handler)) | |
61883
6238d2f682a9
(calc-edit-finish): Make sure there is more than one window before
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59614
diff
changeset
|
531 (if (and one-window (not (one-window-p t))) |
40785 | 532 (delete-window)) |
533 (if (get-buffer-window return) | |
534 (select-window (get-buffer-window return)) | |
535 (switch-to-buffer return)) | |
536 (if keep | |
537 (bury-buffer buf) | |
538 (kill-buffer buf)) | |
58335
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
539 (if calc-edit-disp-trail |
40785 | 540 (calc-wrapper |
541 (calc-trail-display 1 t))) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
542 (message ""))) |
40785 | 543 |
544 (defun calc-edit-cancel () | |
545 "Cancel calc-edit mode. Ignore the Calc Edit buffer and don't change stack." | |
546 (interactive) | |
547 (let ((calc-edit-handler nil)) | |
548 (calc-edit-finish)) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
549 (message "(Cancelled)")) |
40785 | 550 |
551 (defun calc-finish-stack-edit (num) | |
552 (let ((buf (current-buffer)) | |
59306
c80fa806ab33
(calc-edit-top): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
59305
diff
changeset
|
553 (str (buffer-substring calc-edit-top (point-max))) |
40785 | 554 (start (point)) |
555 pos) | |
556 (if (and (integerp num) (> num 1)) | |
557 (while (setq pos (string-match "\n." str)) | |
558 (aset str pos ?\,))) | |
559 (switch-to-buffer calc-original-buffer) | |
560 (let ((vals (let ((calc-language nil) | |
81472
1ae3e881bf9c
(calc-finish-stack-edit): Let math-expr-opers equal the function
Jay Belanger <jay.p.belanger@gmail.com>
parents:
77465
diff
changeset
|
561 (math-expr-opers (math-standard-ops))) |
40785 | 562 (and (string-match "[^\n\t ]" str) |
563 (math-read-exprs str))))) | |
41271
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
564 (when (eq (car-safe vals) 'error) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
565 (switch-to-buffer buf) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
566 (goto-char (+ start (nth 1 vals))) |
fcd507927105
Change all toplevel `setq' forms to `defvar' forms, and move them
Colin Walters <walters@gnu.org>
parents:
41047
diff
changeset
|
567 (error (nth 2 vals))) |
40785 | 568 (calc-wrapper |
569 (if (symbolp num) | |
570 (progn | |
571 (set num (car vals)) | |
572 (calc-refresh-evaltos num)) | |
58335
4e7e96bc6b95
(calc-edit-disp-trail): New variable.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
573 (if calc-edit-disp-trail |
40785 | 574 (calc-trail-display 1 t)) |
575 (and vals | |
576 (let ((calc-simplify-mode (if (eq last-command-char ?\C-j) | |
577 'none | |
578 calc-simplify-mode))) | |
579 (if (>= num 0) | |
580 (calc-enter-result num "edit" vals) | |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
581 (calc-enter-result 1 "edit" vals (- num)))))))))) |
40785 | 582 |
58679
9a7f5565091f
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58545
diff
changeset
|
583 (provide 'calc-yank) |
9a7f5565091f
Add a provide statement.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
58545
diff
changeset
|
584 |
93880
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
585 ;; Local variables: |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
586 ;; generated-autoload-file: "calc-loaddefs.el" |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
587 ;; End: |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
588 |
c6152337e4ad
* calc/calc.el: Load "cal-loaddefs" rather than set up autoloads manually.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
589 ;; arch-tag: ca61019e-caca-4daa-b32c-b6afe372d5b5 |
41047
73f364fd8aaa
Style cleanup; don't put closing parens on their
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
590 ;;; calc-yank.el ends here |