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