Changeset 8d3763 in git
- Timestamp:
- Sep 14, 1999, 11:00:59 PM (24 years ago)
- Branches:
- (u'spielwiese', 'd1ba061a762c62d3a25159d8da8b6e17332291fa')
- Children:
- f13dc47963e81b600861261108107ac8d00cc32f
- Parents:
- f4d1acce2cd9b5408e6b0edc0aca9588c1c5c790
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/singular.el
rf4d1ac r8d3763 1 1 ;;; singular.el --- Emacs support for Computer Algebra System Singular 2 2 3 ;; $Id: singular.el,v 1.4 1 1999-09-14 20:18:15wichmann Exp $3 ;; $Id: singular.el,v 1.42 1999-09-14 21:00:59 wichmann Exp $ 4 4 5 5 ;;; Commentary: … … 3799 3799 nil)) 3800 3800 3801 (defvar singular-exit-insert-killed-marker nil3802 "Switch indicating if text should be inserted on process finishing.3803 If t, `singular-exit-sentinel' inserts a string at the process mark3804 indicating that the Singular process was killed.3805 3806 This variable is buffer-local.")3807 3808 3801 (defvar singular-exit-cleanup-done nil 3809 3802 "Switch indicating if cleanup after Singular exit is already done. … … 3833 3826 (defun singular-exit-sentinel (process message) 3834 3827 "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." 3828 Calls `singular-exit-cleanup' if `singular-exit-cleanup-done' is nil." 3838 3829 (save-excursion 3839 3830 (singular-debug 'interactive 3840 3831 (message "Sentinel: %s" (substring message 0 -1))) 3841 3832 3833 (singular-debug 'interactive 3834 (message "Sentinel: proc= %s, mark= %s" process (process-mark process))) 3842 3835 (if (string-match "finished\\|exited\\|killed" message) 3843 3836 (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)))) 3853 3842 (setq singular-exit-cleanup-done nil))) 3854 3843 3855 3844 (defun singular-interrupt-singular () 3856 3845 "Delete the Singular process running in the current buffer. 3857 Calls `singular-exit-cleanup' and deletes the Singular process." 3858 (let ((process (singular-process))) 3846 Calls `singular-exit-cleanup' and deletes the Singular process. 3847 Inserts a string indicating that the Singular process is killed." 3848 (let* ((process (singular-process)) 3849 (mark (marker-position (process-mark process)))) 3859 3850 (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")))) 3862 3855 3863 3856 (defun singular-exec (buffer name executable start-file switches)
Note: See TracChangeset
for help on using the changeset viewer.