Changeset b7b6c7f in git


Ignore:
Timestamp:
Aug 24, 1999, 9:12:08 AM (25 years ago)
Author:
Tim Wichmann <wichmann@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
110f753ab57904fd20a99610f43c3a1f9f4672ff
Parents:
394445bff13ecf8491929894b7e3897a542c08f9
Message:
1999-08-23  T. Wichmann  <wichmann@arboretum.itwm.uni-kl.de>

	* singular.el (singular-interactive-mode-menu-init): Any menu
	installed by comint-mode is removed
	(singular-exit-sentinel): remove libraries menu only if buffer is
	existent
	Added a "*" to some variables` doc string


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

Legend:

Unmodified
Added
Removed
  • emacs/singular.el

    r394445b rb7b6c7f  
    11;;; singular.el --- Emacs support for Computer Algebra System Singular
    22
    3 ;; $Id: singular.el,v 1.34 1999-08-18 18:40:44 wichmann Exp $
     3;; $Id: singular.el,v 1.35 1999-08-24 07:12:08 wichmann Exp $
    44
    55;;; Commentary:
     
    628628  (easy-menu-change '("Commands") "libraries" singular-menu-initial-library-menu))
    629629
    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!
    638634(or singular-interactive-mode-menu-2
    639635    (easy-menu-define
     
    662658      )))
    663659
    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])))
    675668
    676669(defun singular-interactive-mode-menu-init ()
     
    678671
    679672This 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
    680690  ;; Note: easy-menu-add is not necessary in emacs, since the menu
    681691  ;; is added automatically with the keymap.
     
    33693379;;{{{ Starting singular
    33703380(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.
    33723382If the file named by this variable exists it is given as initial input
    33733383to any Singular process being started.  Note that this may lose due to
     
    33783388
    33793389(defcustom singular-executable-default "Singular"
    3380   "Default name of Singular executable.
     3390  "*Default name of Singular executable.
    33813391Used by `singular' when new Singular processes are started.
    33823392If the name is given without path the executable is searched using the
     
    33923402
    33933403(defcustom singular-directory-default nil
    3394   "Default working directory of Singular buffer.
     3404  "*Default working directory of Singular buffer.
    33953405Should be either nil (which means do not set the default directory) or an
    33963406existing directory."
     
    34073417
    34083418(defcustom singular-switches-default '()
    3409   "List of default switches for Singular processes.
     3419  "*List of default switches for Singular processes.
    34103420Should be a list of strings, one string for each switch.
    34113421Used by `singular' when new Singular processes are started."
     
    34303440
    34313441(defcustom singular-name-default "singular"
    3432   "Default process name for Singular process.
     3442  "*Default process name for Singular process.
    34333443Used by `singular' when new Singular processes are started.
    34343444This string surrounded by \"*\" will also be the buffer name."
     
    34693479    ;; exit demo mode if necessary
    34703480    (singular-demo-exit)
    3471     (singular-menu-deinstall-libraries)
    34723481    (singular-scan-header-exit)
    34733482    (if (string-match "finished\\|exited" message)
     
    34773486                   (set-buffer process-buffer))
    34783487              ;; write back history
    3479               (singular-history-write))))))
     3488              (progn
     3489                (singular-menu-deinstall-libraries)
     3490                (singular-history-write)))))))
    34803491
    34813492(defun singular-exec (buffer name executable start-file switches)
     
    35423553      (set-buffer old-buffer))))
    35433554
     3555
     3556;; TODO: Documentation!
    35443557;; Note:
    35453558;;
     
    36633676buffer name and the command line switches, and starts Singular."
    36643677  (interactive)
    3665   (interactive "fSingular executable: ")
    36663678  (let* ((executable (read-file-name "Singular executable: "))
    36673679         ;; Remark: Do NOT call `expand-file-name' after the
     
    37013713        (setq name (substring name (match-beginning 1) (match-end 1))))
    37023714
    3703     (singular-internal executable directory switches name))) 
     3715    (singular-internal executable directory switches name)))
    37043716
    37053717;; for convenience only
Note: See TracChangeset for help on using the changeset viewer.