aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-01-27 13:00:18 +0000
committerEli Zaretskii2001-01-27 13:00:18 +0000
commit224a0b4d5152a7680fbfafc1b5204c0ffd6c7feb (patch)
treea4b552dc2aad758951f4e9bf330aad98319c3879
parentf5058b9653e1aa98001902d18a0586d36c46f1d2 (diff)
downloademacs-224a0b4d5152a7680fbfafc1b5204c0ffd6c7feb.tar.gz
emacs-224a0b4d5152a7680fbfafc1b5204c0ffd6c7feb.zip
Add two items with solutions for Calc problems.
-rw-r--r--etc/PROBLEMS258
1 files changed, 258 insertions, 0 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 8778f7e3132..16d2fc84404 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -220,6 +220,264 @@ longer used by Emacs. These changes to PSGML 1.2.1 fix that.
220+ (setq after-change-functions '(sgml-set-face-after-change)) 220+ (setq after-change-functions '(sgml-set-face-after-change))
221 ) 221 )
222 222
223* The Calc package fails to build and signals errors with Emacs 21.
224
225Apply the following patches which reportedly fix several problems:
226
227--- calc-ext.el.~1~ Sun Apr 3 02:26:34 1994
228+++ calc-ext.el Wed Sep 18 17:35:01 1996
229@@ -1354,6 +1354,25 @@
230 (calc-fancy-prefix 'calc-inverse-flag "Inverse..." n)
231 )
232
233+(defconst calc-fancy-prefix-map
234+ (let ((map (make-sparse-keymap)))
235+ (define-key map [t] 'calc-fancy-prefix-other-key)
236+ (define-key map (vector meta-prefix-char t) 'calc-fancy-prefix-other-key)
237+ (define-key map [switch-frame] nil)
238+ (define-key map [?\C-u] 'universal-argument)
239+ (define-key map [?0] 'digit-argument)
240+ (define-key map [?1] 'digit-argument)
241+ (define-key map [?2] 'digit-argument)
242+ (define-key map [?3] 'digit-argument)
243+ (define-key map [?4] 'digit-argument)
244+ (define-key map [?5] 'digit-argument)
245+ (define-key map [?6] 'digit-argument)
246+ (define-key map [?7] 'digit-argument)
247+ (define-key map [?8] 'digit-argument)
248+ (define-key map [?9] 'digit-argument)
249+ map)
250+ "Keymap used while processing calc-fancy-prefix.")
251+
252 (defun calc-fancy-prefix (flag msg n)
253 (let (prefix)
254 (calc-wrapper
255@@ -1364,6 +1383,8 @@
256 (message (if prefix msg "")))
257 (and prefix
258 (not calc-is-keypad-press)
259+ (if (boundp 'overriding-terminal-local-map)
260+ (setq overriding-terminal-local-map calc-fancy-prefix-map)
261 (let ((event (calc-read-key t)))
262 (if (eq (setq last-command-char (car event)) ?\C-u)
263 (universal-argument)
264@@ -1376,9 +1397,18 @@
265 (if (or (not (integerp last-command-char))
266 (eq last-command-char ?-))
267 (calc-unread-command)
268- (digit-argument n))))))
269+ (digit-argument n)))))))
270 )
271 (setq calc-is-keypad-press nil)
272+
273+(defun calc-fancy-prefix-other-key (arg)
274+ (interactive "P")
275+ (if (or (not (integerp last-command-char))
276+ (and (>= last-command-char 0) (< last-command-char ? )
277+ (not (eq last-command-char meta-prefix-char))))
278+ (calc-wrapper)) ; clear flags if not a Calc command.
279+ (calc-unread-command)
280+ (setq overriding-terminal-local-map nil))
281
282 (defun calc-invert-func ()
283 (save-excursion
284
285--- Makefile.~1~ Sun Dec 15 23:50:45 1996
286+++ Makefile Thu Nov 30 15:09:45 2000
287@@ -41,7 +41,7 @@
288
289 # Other macros.
290 EFLAGS = -batch
291-MAINT = -l calc-maint.elc
292+MAINT = -l calc-maint.el
293
294 # Control whether intermediate files are kept.
295 PURGE = -rm -f
296@@ -154,10 +154,7 @@
297
298
299 # All this because "-l calc-maint" doesn't work.
300-maint: calc-maint.elc
301-calc-maint.elc: calc-maint.el
302- cp calc-maint.el calc-maint.elc
303-
304+maint: calc-maint.el
305
306 # Create an Emacs TAGS file
307 tags: TAGS
308
309--- calc-aent.el.~1~ Sun Dec 15 23:50:36 1996
310+++ calc-aent.el Tue Nov 21 18:34:33 2000
311@@ -385,7 +385,7 @@
312 (calc-minibuffer-contains
313 "\\`\\([^\"]*\"[^\"]*\"\\)*[^\"]*\"[^\"]*\\'"))
314 (insert "`")
315- (setq alg-exp (buffer-string))
316+ (setq alg-exp (field-string))
317 (and (> (length alg-exp) 0) (setq calc-previous-alg-entry alg-exp))
318 (exit-minibuffer))
319 )
320@@ -393,14 +393,14 @@
321
322 (defun calcAlg-enter ()
323 (interactive)
324- (let* ((str (buffer-string))
325+ (let* ((str (field-string))
326 (exp (and (> (length str) 0)
327 (save-excursion
328 (set-buffer calc-buffer)
329 (math-read-exprs str)))))
330 (if (eq (car-safe exp) 'error)
331 (progn
332- (goto-char (point-min))
333+ (goto-char (field-beginning))
334 (forward-char (nth 1 exp))
335 (beep)
336 (calc-temp-minibuffer-message
337@@ -455,14 +455,14 @@
338 (interactive)
339 (if (calc-minibuffer-contains ".*[@oh] *[^'m ]+[^'m]*\\'")
340 (calcDigit-key)
341- (setq calc-digit-value (buffer-string))
342+ (setq calc-digit-value (field-string))
343 (exit-minibuffer))
344 )
345
346 (defun calcDigit-edit ()
347 (interactive)
348 (calc-unread-command)
349- (setq calc-digit-value (buffer-string))
350+ (setq calc-digit-value (field-string))
351 (exit-minibuffer)
352 )
353
354--- calc.el.~1~ Sun Dec 15 23:50:47 1996
355+++ calc.el Wed Nov 22 13:08:49 2000
356@@ -2051,11 +2051,11 @@
357 ;; Exercise for the reader: Figure out why this is a good precaution!
358 (or (boundp 'calc-buffer)
359 (use-local-map minibuffer-local-map))
360- (let ((str (buffer-string)))
361+ (let ((str (field-string)))
362 (setq calc-digit-value (save-excursion
363 (set-buffer calc-buffer)
364 (math-read-number str))))
365- (if (and (null calc-digit-value) (> (buffer-size) 0))
366+ (if (and (null calc-digit-value) (> (field-end) (field-beginning)))
367 (progn
368 (beep)
369 (calc-temp-minibuffer-message " [Bad format]"))
370@@ -2071,7 +2071,7 @@
371
372 (defun calc-minibuffer-contains (rex)
373 (save-excursion
374- (goto-char (point-min))
375+ (goto-char (field-end (point-min)))
376 (looking-at rex))
377 )
378
379@@ -2158,10 +2158,8 @@
380 (upcase last-command-char))))
381 (and dig
382 (< dig radix)))))))
383- (save-excursion
384- (goto-char (point-min))
385- (looking-at
386- "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9]+\\.?0*[@oh] *\\)?\\([0-9]+\\.?0*['m] *\\)?[0-9]*\\(\\.?[0-9]*\\(e[-+]?[0-3]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\\)?\\|[0-9]:\\([0-9]+:\\)?[0-9]*\\)?[\"s]?\\'")))
387+ (calc-minibuffer-contains
388+ "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9]+\\.?0*[@oh] *\\)?\\([0-9]+\\.?0*['m] *\\)?[0-9]*\\(\\.?[0-9]*\\(e[-+]?[0-3]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?\\)?\\|[0-9]:\\([0-9]+:\\)?[0-9]*\\)?[\"s]?\\'"))
389 (if (and (memq last-command-char '(?@ ?o ?h ?\' ?m))
390 (string-match " " calc-hms-format))
391 (insert " "))
392@@ -2190,7 +2188,7 @@
393 ((eq last-command 'calcDigit-start)
394 (erase-buffer))
395 (t (backward-delete-char 1)))
396- (if (= (buffer-size) 0)
397+ (if (= (field-beginning) (field-end))
398 (progn
399 (setq last-command-char 13)
400 (calcDigit-nondigit)))
401
402* TeX'ing the Calc manual fails.
403
404The following patches allow to build the Calc manual using texinfo.tex
405from Emacs 19.34 distribution:
406
407*** calc-maint.e~0 Mon Dec 16 07:11:26 1996
408--- calc-maint.el Sun Dec 10 14:32:38 2000
409***************
410*** 308,314 ****
411 (insert "@tex\n"
412 "\\global\\advance\\appendixno2\n"
413 "\\gdef\\xref#1.{See ``#1.''}\n")
414! (setq midpos (point))
415 (insert "@end tex\n")
416 (insert-buffer-substring srcbuf sumpos endpos)
417 (insert "@bye\n")
418--- 308,314 ----
419 (insert "@tex\n"
420 "\\global\\advance\\appendixno2\n"
421 "\\gdef\\xref#1.{See ``#1.''}\n")
422! (setq midpos (point-marker))
423 (insert "@end tex\n")
424 (insert-buffer-substring srcbuf sumpos endpos)
425 (insert "@bye\n")
426*** Makefile.~0 Mon Dec 16 07:11:24 1996
427--- Makefile Sun Dec 10 14:44:00 2000
428***************
429*** 98,106 ****
430 # Format the Calc manual as one printable volume using TeX.
431 tex:
432 $(REMOVE) calc.aux
433! $(TEX) calc.texinfo
434 $(TEXINDEX) calc.[cfkptv]?
435! $(TEX) calc.texinfo
436 $(PURGE) calc.cp calc.fn calc.pg calc.tp calc.vr
437 $(PURGE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
438 $(PURGE) calc.toc
439--- 98,106 ----
440 # Format the Calc manual as one printable volume using TeX.
441 tex:
442 $(REMOVE) calc.aux
443! -$(TEX) calc.texinfo
444 $(TEXINDEX) calc.[cfkptv]?
445! -$(TEX) calc.texinfo
446 $(PURGE) calc.cp calc.fn calc.pg calc.tp calc.vr
447 $(PURGE) calc.cps calc.fns calc.kys calc.pgs calc.tps calc.vrs
448 $(PURGE) calc.toc
449*** calc.texinfo.~1~ Thu Oct 10 18:18:56 1996
450--- calc.texinfo Mon Dec 11 08:25:00 2000
451***************
452*** 12,17 ****
453--- 12,19 ----
454 % Because makeinfo.c exists, we can't just define new commands.
455 % So instead, we take over little-used existing commands.
456 %
457+ % Suggested by Karl Berry <karl@@freefriends.org>
458+ \gdef\!{\mskip-\thinmuskip}
459 % Redefine @cite{text} to act like $text$ in regular TeX.
460 % Info will typeset this same as @samp{text}.
461 \gdef\goodtex{\tex \let\rm\goodrm \let\t\ttfont \turnoffactive}
462***************
463*** 23686,23692 ****
464 a vector of the actual parameter values, written as equations:
465 @cite{[a = 3, b = 2]}, in case you'd rather read them in a list
466 than pick them out of the formula. (You can type @kbd{t y}
467! to move this vector to the stack; @pxref{Trail Commands})
468
469 Specifying a different independent variable name will affect the
470 resulting formula: @kbd{a F 1 k RET} produces @kbd{3 + 2 k}.
471--- 23689,23695 ----
472 a vector of the actual parameter values, written as equations:
473 @cite{[a = 3, b = 2]}, in case you'd rather read them in a list
474 than pick them out of the formula. (You can type @kbd{t y}
475! to move this vector to the stack; see @ref{Trail Commands}.)
476
477 Specifying a different independent variable name will affect the
478 resulting formula: @kbd{a F 1 k RET} produces @kbd{3 + 2 k}.
479
480
223* On systems with shared libraries you might encounter run-time errors 481* On systems with shared libraries you might encounter run-time errors
224from the dynamic linker telling you that it is unable to find some 482from the dynamic linker telling you that it is unable to find some
225shared libraries, for instance those for Xaw3d or image support. 483shared libraries, for instance those for Xaw3d or image support.