Could somebody please look at this one for me. I applied it locally,
but it caused calc to barf on exit, with 'Wrong type argument:
markerp, nil'.
|--==> "MP" == Markus Pahlow <pahlowm(a)mar.dfo-mpo.gc.ca> writes:
MP> I found two little bugs running calc under xemacs. Firstly, the * and
MP> / key on the numeric keypad did not work. Secondly, when calc was
MP> called while several windows were displayed in a frame, quitting calc
MP> caused an error message because window-edges is not defined in
MP> xemacs. The following patch fixes them.
MP> I hope this is helpful,
MP> Markus Pahlow
MP> diff -u calc-1.16/calc-misc.el calc/calc-misc.el
MP> --- calc-1.16/calc-misc.el Fri Aug 3 13:59:20 2001
MP> +++ calc/calc-misc.el Wed Jul 18 17:30:59 2001
MP> @@ -161,8 +161,11 @@
MP> ;;; application, such as GNUS.
MP> (defun calc-delete-windows-keep (&rest bufs)
MP> - (if (one-window-p)
MP> - (mapcar 'delete-windows-on bufs)
MP> + (if (or (one-window-p) running-xemacs)
MP> + (let ((m (marker-buffer calc-return-marker)))
MP> + (mapcar (lambda (b) (if b (delete-windows-on b))) bufs)
MP> + (if m (let ((w (get-buffer-window m)))
MP> + (select-window w))))
MP> (let* ((w (car calc-was-split))
MP> (e (window-edges w))
MP> (wins nil)
MP> diff -u calc-1.16/calc.el calc/calc.el
MP> --- calc-1.16/calc.el Fri Aug 3 13:59:31 2001
MP> +++ calc/calc.el Tue Jul 31 10:47:32 2001
MP> @@ -114,11 +114,10 @@
MP> ;; If NIL, only DEL itself is mapped to calc-pop.
MP> (defvar calc-scan-for-dels t)
MP> -
MP> -
MP> (defvar calc-extensions-loaded nil)
MP> -
MP> +(defvar calc-return-marker nil
MP> + "Position of point immediately before calc was started.")
MP> ;;; IDEAS:
MP> ;;;
MP> @@ -818,10 +817,14 @@
MP> "_0123456789.e+-:n#@oh'\"mspM")
MP> ;; XEmacs change npak(a)ispras.ru
MP> (if calc-emacs-type-lucid
MP> - (mapc #'(lambda (key)
MP> - (define-key calc-digit-map key 'calcDigit-key))
MP> - '(kp-1 kp-2 kp-3 kp-4 kp-5 kp-6 kp-7 kp-8 kp-9 kp-0
MP> - kp-decimal kp-add kp-subtract kp-multiply kp-divide)))
MP> + (progn
MP> + (mapc #'(lambda (key)
MP> + (define-key calc-digit-map key 'calcDigit-key))
MP> + '(kp-1 kp-2 kp-3 kp-4 kp-5 kp-6 kp-7 kp-8 kp-9 kp-0
MP> + kp-decimal kp-add kp-subtract))
MP> + (mapc #'(lambda (key)
MP> + (define-key calc-digit-map key 'calcDigit-nondigit))
MP> + '(kp-multiply kp-divide))))
MP> (mapcar (function
MP> (lambda (x)
MP> (define-key calc-digit-map (char-to-string x)
MP> @@ -956,6 +959,7 @@
MP> "Invoke the GNU Emacs Calculator. See calc-dispatch-help for
details."
MP> (interactive "P")
MP> (sit-for echo-keystrokes)
MP> + (setq calc-return-marker (point-marker))
MP> (condition-case err ; look for other keys bound to calc-dispatch
MP> (let ((keys (this-command-keys)))
MP> (or (not (stringp keys))
--
|---<Steve Youngs>---------------<GnuPG KeyID: 9E7E2820>---|
| XEmacs - It's not just an editor. |
| It's a way of life. |
|------------------------------------<youngs(a)xemacs.org>---|
Show replies by date