Changeset 2690cd in git


Ignore:
Timestamp:
Aug 30, 1999, 10:05:14 PM (25 years ago)
Author:
Tim Wichmann <wichmann@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
81cc121c271bb464cdd71be4803ebdf5f91ccd03
Parents:
3752f87abf8b5c7e453cc308ed8dbed9235a6d8a
Message:
1999-08-30  T. Wichmann  <wichmann@itwm.uni-kl.de>

	* singular.el (singular, singular-restart, singular-other): Doc
	  strings rewritten

1999-08-25  T. Wichmann  <wichmann@arboretum.itwm.uni-kl.de>

	* singular.el (singular-other) now has 4 arguments

	* Added "-t" to singular-switches-magic

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@3567 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emacs/singular.el

    r3752f8 r2690cd  
    11;;; singular.el --- Emacs support for Computer Algebra System Singular
    22
    3 ;; $Id: singular.el,v 1.37 1999-08-30 19:08:18 wichmann Exp $
     3;; $Id: singular.el,v 1.38 1999-08-30 20:05:14 wichmann Exp $
    44
    55;;; Commentary:
     
    37063706  "History list of Singular switches.")
    37073707
    3708 (defvar singular-switches-magic '("--emacs")
     3708(defvar singular-switches-magic '("-t" "--emacs")
    37093709  "Additional magic switches for Singular process.
    37103710List of switch-strings which are automagically added when new Singular
    3711 processes are started.
    3712 This list should at least contain the option \"--emacs\". If you are
    3713 running an older version of Singular, remove this option from the list.")
     3711processes are started, one string for each command line argument.
     3712This list should at least contain the options \"--emacs\" and \"-t\". If
     3713you are running an older version of Singular, remove option \"--emacs\"
     3714from the list.")
    37143715
    37153716(defcustom singular-name-default "singular"
     
    39023903
    39033904(defun singular ()
    3904   "Start Singular using default values.
    3905 Starts Singular using the values of `singular-executable-default',
    3906 `singular-directory-default', `singular-switches-default', and
    3907 `singular-name-default'."
     3905  "Run an inferior Singular process using default arguments. 
     3906Starts a Singular process, with I/O through an Emacs buffer, using the
     3907values of `singular-executable-default', `singular-directory-default',
     3908`singular-switches-default', and `singular-name-default'.
     3909
     3910For more information on starting a Singular process and on the arguments
     3911see the documentation of `singular-other'. To restart a previously started
     3912Singular process use `singular-restart'.
     3913
     3914Every time `singular' starts a new Singular process it runs the hooks
     3915on `singular-exec-hook'.
     3916
     3917Type \\[describe-mode] in the Singular buffer for a list of commands."
    39083918  (interactive)
    39093919  (singular-internal singular-executable-default
     
    39133923
    39143924(defun singular-restart ()
    3915   "Start Singular using the last values used.
    3916 If called within a Singular buffer, uses the buffer local values last used
    3917 in this buffer.
    3918 If called outside a Singular buffer, uses the last values used by any
    3919 Singular buffer.
    3920 If no last values are available, uses the default values."
     3925  "Run an inferior Singular process using the last arguments used.
     3926Starts a Singular process, with I/O through an Emacs buffer, using the
     3927previously used arguments.
     3928If called within a Singular buffer, uses the arguments of the most recent
     3929Singular process started in this buffer.
     3930If called outside a Singular buffer, uses the arguments of the most recent
     3931Singular process started in any Singular buffer.
     3932If no last values are available, uses the default values (see documentation
     3933of `singular').
     3934
     3935For more information on starting a Singular process and on the arguments
     3936see the documentation of `singular-other'.
     3937
     3938Every time `singular-restarts' starts a new Singular process it runs the
     3939hooks on `singular-exec-hook'.
     3940
     3941Type \\[describe-mode] in the Singular buffer for a list of commands."
    39213942  (interactive)
    39223943  (singular-internal singular-executable-last
     
    39263947
    39273948(defun singular-other ()
    3928   "Ask for arguments and start Singular.
    3929 Interactively asks values for the executable, the default directory, the
    3930 buffer name and the command line switches, and starts Singular."
    3931   (interactive)
    3932   (let* ((executable (read-file-name "Singular executable: "))
     3949  "Run an inferior Singular process.
     3950Starts a Singular process, with I/O through an Emacs buffer.
     3951
     3952If called interactively, the user is asked in the minibuffer area for an
     3953existing executable (with or without path), an exisiting directory or nil
     3954(if non-nil, sets the buffers default directory to this directory), the
     3955complete command line arguments to be passed to Singular (as a single
     3956string) and the buffer name of the singular buffer, which is surrounded by
     3957\"*\", if not already. (The process name of the singular process is then
     3958given by the buffer name with the surrounding stars stripped.)
     3959
     3960If called non-interactiveley, EXECUTABLE is the name of an existing
     3961Singular executable (with or without path), DIRECTORY is the name of an
     3962existing directory or nil. If non-nil, sets the buffers default directory
     3963to DIRECTORY. SWITCHES is a list of strings where each string contains one
     3964command line argument which is passed to Singular, and NAME is the process
     3965name of the Singular process (that is, the singular buffer name is given by
     3966NAME surrounded by \"*\").
     3967
     3968If buffer exists but Singular is not running, starts new Singular.
     3969If buffer exists and Singular is running, just switches to buffer.
     3970If a file `~/.emacs_singularrc' exists, it is given as initial input.
     3971Note that this may lose due to a timing error if Singular discards
     3972input when it starts up.
     3973
     3974If a new buffer is created it is put in Singular interactive mode,
     3975giving commands for sending input and handling output of Singular.  See
     3976`singular-interactive-mode'.
     3977
     3978Every time `singular-other' starts a new Singular process it runs the hooks
     3979on `singular-exec-hook'.
     3980
     3981Type \\[describe-mode] in the Singular buffer for a list of commands."
     3982  (interactive
     3983   (let* ((exec (read-file-name "Singular executable: "))
    39333984         ;; Remark: Do NOT call `expand-file-name' after the
    39343985         ;; above read-file-name! It has to be possible to enter a command
     
    39363987         ;; `start-process' is intelligent enough to start commands with
    39373988         ;; not-expanded name.
    3938          (directory (file-name-directory (read-file-name "Default directory: "
    3939                                                          nil
    3940                                                          (or singular-directory-default
    3941                                                              default-directory)
    3942                                                          t)))
    3943          (switches "")
    3944          (name (singular-generate-new-buffer-name
    3945                 (downcase (file-name-nondirectory executable)))))
    3946 
    3947     ;; Get command line arguments and append magic switches
    3948     ;; TODO: Think about default value: Up to now:
    3949     ;; Use singular-switches-default as init value for read-from-minibuffer
    3950     (let ((switches-default singular-switches-default))
    3951       (while switches-default
    3952         (setq switches (concat switches (car switches-default) " "))
    3953         (setq switches-default (cdr switches-default))))
    3954     ;; note: magic switches are appended by `singular-internal'
    3955     (setq switches (split-string (read-from-minibuffer "Singular options: "
    3956                                                        switches nil nil
    3957                                                        singular-switches-history)
    3958                                  " "))
    3959 
    3960     ;; Generate new buffer name
    3961     (let (done)
    3962       (while (not done)
    3963         (setq name (read-from-minibuffer "Singular buffer name: " name))
    3964         (setq done (or (not (get-buffer name))
    3965                        (y-or-n-p "Buffer exists. Switch to that buffer? ")))))
    3966     (if (string-match "^\\*\\(.*\\)\\*$" name)
    3967         (setq name (substring name (match-beginning 1) (match-end 1))))
    3968 
    3969     (singular-internal executable directory switches name)))
     3989          (dir (file-name-directory (read-file-name "Default directory: "
     3990                                                    nil
     3991                                                    (or singular-directory-default
     3992                                                        default-directory)
     3993                                                    t)))
     3994         (switch "")
     3995         (bufname (singular-generate-new-buffer-name
     3996                   (downcase (file-name-nondirectory exec)))))
     3997
     3998     ;; Get command line arguments and append magic switches
     3999     ;; TODO: Think about default value: Up to now:
     4000     ;; Use singular-switches-default as init value for read-from-minibuffer
     4001     (let ((switches-default singular-switches-default))
     4002       (while switches-default
     4003         (setq switch (concat switch (car switches-default) " "))
     4004         (setq switches-default (cdr switches-default))))
     4005     ;; note: magic switches are appended by `singular-internal'
     4006     (setq switch (split-string (read-from-minibuffer "Singular options: "
     4007                                                      switch nil nil
     4008                                                      singular-switches-history)
     4009                                " "))
     4010     
     4011     ;; Generate new buffer name
     4012     (let (done)
     4013       (while (not done)
     4014         (setq bufname (read-from-minibuffer "Singular buffer name: " bufname))
     4015         (setq done (or (not (get-buffer bufname))
     4016                        (y-or-n-p "Buffer exists. Switch to that buffer? ")))))
     4017     (if (string-match "^\\*\\(.*\\)\\*$" bufname)
     4018         (setq bufname (substring bufname (match-beginning 1) (match-end 1))))
     4019     (list exec dir switch bufname)))
     4020
     4021  (singular-internal executable directory switches name))
    39704022
    39714023(defun singular-exit-singular ()
Note: See TracChangeset for help on using the changeset viewer.