- Timestamp:
- Aug 24, 1999, 9:12:08 AM (25 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 110f753ab57904fd20a99610f43c3a1f9f4672ff
- Parents:
- 394445bff13ecf8491929894b7e3897a542c08f9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/singular.el
r394445b rb7b6c7f 1 1 ;;; singular.el --- Emacs support for Computer Algebra System Singular 2 2 3 ;; $Id: singular.el,v 1.3 4 1999-08-18 18:40:44wichmann Exp $3 ;; $Id: singular.el,v 1.35 1999-08-24 07:12:08 wichmann Exp $ 4 4 5 5 ;;; Commentary: … … 628 628 (easy-menu-change '("Commands") "libraries" singular-menu-initial-library-menu)) 629 629 630 (or singular-interactive-mode-menu-1 631 (easy-menu-define singular-interactive-mode-menu-1 632 singular-interactive-mode-map "" 633 '("Singular" 634 ["start default" singular t] 635 ["start..." singular-other t] 636 ["exit" singular-exit-singular t]))) 637 630 ;; For some reasons emacs inserts new menus in the oppsite order. 631 ;; Defining menu-2 prior to menu-1 will result in the follwoing menu: 632 ;; Singular Commands 633 ;; That's what we want. So DO NOT exchange both (or ..) statements! 638 634 (or singular-interactive-mode-menu-2 639 635 (easy-menu-define … … 662 658 ))) 663 659 664 ;; NOT READY 665 ;; This is just a temporary hack for XEmacs demo. 666 (defvar singular-install-in-main-menu nil 667 "NOT READY [docu]") 668 669 (if singular-install-in-main-menu 670 (cond 671 ;; XEmacs 672 ((eq singular-emacs-flavor 'xemacs) 673 (add-submenu nil 674 singular-start-menu-definition)))) 660 (or singular-interactive-mode-menu-1 661 (easy-menu-define singular-interactive-mode-menu-1 662 singular-interactive-mode-map "" 663 '("Singular" 664 ["start default" singular t] 665 ["start..." singular-other t] 666 ["restart" singular-restart t] 667 ["exit" singular-exit-singular t]))) 675 668 676 669 (defun singular-interactive-mode-menu-init () … … 678 671 679 672 This function is called at mode initialization time." 673 ;; Remove any potential menu which comint-mode might has added. 674 (cond 675 ;; Emacs 676 ((eq singular-emacs-flavor 'emacs) 677 ;; Note that easy-menu-remove is a nop in emacs. 678 (define-key comint-mode-map [menu-bar signals] nil) 679 (define-key comint-mode-map [menu-bar inout] nil) 680 (define-key comint-mode-map [menu-bar completion] nil)) 681 ;;Xemacs 682 (t 683 (easy-menu-remove '("Comint1")) ; XEmacs 20 684 (easy-menu-remove '("Comint2")) ; XEmacs 20 685 (easy-menu-remove '("History")) ; XEmacs 20 686 (easy-menu-remove '("Complete")) ; XEmacs 21 687 (easy-menu-remove '("In/Out")) ; XEmacs 21 688 (easy-menu-remove '("Signals")))) ; XEmacs 21 689 680 690 ;; Note: easy-menu-add is not necessary in emacs, since the menu 681 691 ;; is added automatically with the keymap. … … 3369 3379 ;;{{{ Starting singular 3370 3380 (defcustom singular-start-file "~/.emacs_singularrc" 3371 " Name of start-up file to pass to Singular.3381 "*Name of start-up file to pass to Singular. 3372 3382 If the file named by this variable exists it is given as initial input 3373 3383 to any Singular process being started. Note that this may lose due to … … 3378 3388 3379 3389 (defcustom singular-executable-default "Singular" 3380 " Default name of Singular executable.3390 "*Default name of Singular executable. 3381 3391 Used by `singular' when new Singular processes are started. 3382 3392 If the name is given without path the executable is searched using the … … 3392 3402 3393 3403 (defcustom singular-directory-default nil 3394 " Default working directory of Singular buffer.3404 "*Default working directory of Singular buffer. 3395 3405 Should be either nil (which means do not set the default directory) or an 3396 3406 existing directory." … … 3407 3417 3408 3418 (defcustom singular-switches-default '() 3409 " List of default switches for Singular processes.3419 "*List of default switches for Singular processes. 3410 3420 Should be a list of strings, one string for each switch. 3411 3421 Used by `singular' when new Singular processes are started." … … 3430 3440 3431 3441 (defcustom singular-name-default "singular" 3432 " Default process name for Singular process.3442 "*Default process name for Singular process. 3433 3443 Used by `singular' when new Singular processes are started. 3434 3444 This string surrounded by \"*\" will also be the buffer name." … … 3469 3479 ;; exit demo mode if necessary 3470 3480 (singular-demo-exit) 3471 (singular-menu-deinstall-libraries)3472 3481 (singular-scan-header-exit) 3473 3482 (if (string-match "finished\\|exited" message) … … 3477 3486 (set-buffer process-buffer)) 3478 3487 ;; write back history 3479 (singular-history-write)))))) 3488 (progn 3489 (singular-menu-deinstall-libraries) 3490 (singular-history-write))))))) 3480 3491 3481 3492 (defun singular-exec (buffer name executable start-file switches) … … 3542 3553 (set-buffer old-buffer)))) 3543 3554 3555 3556 ;; TODO: Documentation! 3544 3557 ;; Note: 3545 3558 ;; … … 3663 3676 buffer name and the command line switches, and starts Singular." 3664 3677 (interactive) 3665 (interactive "fSingular executable: ")3666 3678 (let* ((executable (read-file-name "Singular executable: ")) 3667 3679 ;; Remark: Do NOT call `expand-file-name' after the … … 3701 3713 (setq name (substring name (match-beginning 1) (match-end 1)))) 3702 3714 3703 (singular-internal executable directory switches name))) 3715 (singular-internal executable directory switches name))) 3704 3716 3705 3717 ;; for convenience only
Note: See TracChangeset
for help on using the changeset viewer.