Changeset 8d3763 in git for emacs/singular.el


Ignore:
Timestamp:
Sep 14, 1999, 11:00:59 PM (25 years ago)
Author:
Tim Wichmann <wichmann@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f13dc47963e81b600861261108107ac8d00cc32f
Parents:
f4d1acce2cd9b5408e6b0edc0aca9588c1c5c790
Message:
1999-09-14  T. Wichmann  <wichmann@arboretum.itwm.uni-kl.de>

	* singular.el (singular-inerrupt-singular): Now inserts the string
	indicating killing of Singular process (due to marker-problems in
	XEmacs)


git-svn-id: file:///usr/local/Singular/svn/trunk@3609 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emacs/singular.el

    rf4d1ac r8d3763  
    11;;; singular.el --- Emacs support for Computer Algebra System Singular
    22
    3 ;; $Id: singular.el,v 1.41 1999-09-14 20:18:15 wichmann Exp $
     3;; $Id: singular.el,v 1.42 1999-09-14 21:00:59 wichmann Exp $
    44
    55;;; Commentary:
     
    37993799       nil))
    38003800
    3801 (defvar singular-exit-insert-killed-marker nil
    3802   "Switch indicating if text should be inserted on process finishing.
    3803 If t, `singular-exit-sentinel' inserts a string at the process mark
    3804 indicating that the Singular process was killed.
    3805 
    3806 This variable is buffer-local.")
    3807 
    38083801(defvar singular-exit-cleanup-done nil
    38093802  "Switch indicating if cleanup after Singular exit is already done.
     
    38333826(defun singular-exit-sentinel (process message)
    38343827  "Clean up after termination of Singular.
    3835 Calls `singular-exit-cleanup' if `singular-exit-cleanup-done' is nil.
    3836 If `singular-exit-insert-killed-marker' is non-nil, inserts a string at the
    3837 process mark indicating that the process was killed."
     3828Calls `singular-exit-cleanup' if `singular-exit-cleanup-done' is nil."
    38383829  (save-excursion
    38393830    (singular-debug 'interactive
    38403831                    (message "Sentinel: %s" (substring message 0 -1)))
    38413832
     3833    (singular-debug 'interactive
     3834                    (message "Sentinel: proc= %s, mark= %s" process (process-mark process)))
    38423835    (if (string-match "finished\\|exited\\|killed" message)
    38433836        (let ((process-buffer (process-buffer process)))
    3844           (when (and process-buffer
    3845                      (buffer-name process-buffer)
    3846                      (set-buffer process-buffer))
    3847             (when singular-exit-insert-killed-marker
    3848               (goto-char (process-mark process))
    3849               (insert "// ** Singular process killed **\n")
    3850               (setq singular-exit-insert-killed-marker nil))
    3851             (unless singular-exit-cleanup-done
    3852               (singular-exit-cleanup)))))
     3837          (if (and (not singular-exit-cleanup-done)
     3838                   process-buffer
     3839                   (buffer-name process-buffer)
     3840                   (set-buffer process-buffer))
     3841              (singular-exit-cleanup))))
    38533842    (setq singular-exit-cleanup-done nil)))
    38543843
    38553844(defun singular-interrupt-singular ()
    38563845  "Delete the Singular process running in the current buffer.
    3857 Calls `singular-exit-cleanup' and deletes the Singular process."
    3858   (let ((process (singular-process)))
     3846Calls `singular-exit-cleanup' and deletes the Singular process.
     3847Inserts a string indicating that the Singular process is killed."
     3848  (let* ((process (singular-process))
     3849         (mark (marker-position (process-mark process))))
    38593850    (singular-exit-cleanup)
    3860     (setq singular-exit-insert-killed-marker t)
    3861     (delete-process process)))
     3851    (delete-process process)
     3852    (save-excursion
     3853      (goto-char mark)
     3854      (insert "// ** Singular process killed **\n"))))
    38623855
    38633856(defun singular-exec (buffer name executable start-file switches)
Note: See TracChangeset for help on using the changeset viewer.