Changeset eebb93b in git
- Timestamp:
- Dec 6, 1999, 7:36:37 PM (24 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 772c6006e5f2992e642422ea0fb91ddb98106303
- Parents:
- c34e3dd63c952cffb9e1aa1402c32cbdc0bf3bbb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emacs/singular.el
rc34e3d reebb93b 1 1 ;;; singular.el --- Emacs support for Computer Algebra System Singular 2 2 3 ;; $Id: singular.el,v 1.5 2 1999-12-06 16:07:00 obachman Exp $3 ;; $Id: singular.el,v 1.53 1999-12-06 18:36:37 wichmann Exp $ 4 4 5 5 ;;; Commentary: … … 2649 2649 "Load Singular completion and libraries files. 2650 2650 Assumes that `singular-emacs-home-directory' is set to the appropriate 2651 value and loads the files \"cmd-cmpl.el\", \"hlp-cmpl.el\", and2652 \"lib-cmpl.el\".2651 value and loads the files \"cmd-cmpl.el\", \"hlp-cmpl.el\", \"ex-cmpl.el\", 2652 and \"lib-cmpl.el\". 2653 2653 On success calls `singular-menu-install-libraries'." 2654 2654 (or (load (singular-expand-emacs-file-name "cmd-cmpl.el" t) t t t) … … 2656 2656 (or (load (singular-expand-emacs-file-name "hlp-cmpl.el" t) t t t) 2657 2657 (message "Can't find help topic completion file! Help completion disabled.")) 2658 (or (load (singular-expand-emacs-file-name "ex-cmpl.el" t) t t t) 2659 (message "Can't find examples completion file! Examples completion disabled.")) 2658 2660 (if (load (singular-expand-emacs-file-name "lib-cmpl.el" t) t t t) 2659 2661 (singular-menu-install-libraries) … … 2785 2787 (defun singular-completion-init () 2786 2788 "Initialize completion for Singular interactive mode. 2787 Initializes completion of file names, commands and help topics.2789 Initializes completion of file names, commands, examples, and help topics. 2788 2790 2789 2791 This function is called by `singular-exec'." 2790 2792 (singular-debug 'interactive (message "Initializing completion")) 2791 2793 (set (make-local-variable 'singular-commands-alist) nil) 2794 (set (make-local-variable 'singular-examples-alist) nil) 2792 2795 (set (make-local-variable 'singular-help-topics-alist) nil)) 2793 2796 … … 2818 2821 Performs completion of Singular help topics if point is at the end of a 2819 2822 help command (\"help\" or \"?\"). 2823 Performs completion of Singular examples if point is at the end of an 2824 example command (\"example\"). 2820 2825 Otherwise performs completion of Singular commands." 2821 2826 (interactive) … … 2829 2834 ;; else: expand command or help 2830 2835 (let ((end (point)) 2836 (post-prompt (save-excursion 2837 (beginning-of-line) 2838 (singular-prompt-skip-forward))) 2831 2839 beg) 2832 (if (save-excursion 2833 (beginning-of-line) 2834 (singular-prompt-skip-forward) 2835 (looking-at "[ \t]*\\([\\?]\\|help \\)[ \t]*\\(.*\\)")) 2836 ;; then: help completion 2837 (if singular-help-topics-alist 2838 (singular-completion-do (match-string 2) (match-beginning 2) 2839 end singular-help-topics-alist) 2840 (message "Completion of Singular help topics disabled.") 2841 (ding)) 2840 (cond 2841 ((save-excursion 2842 (goto-char post-prompt) 2843 (looking-at "[ \t]*\\([\\?]\\|help \\)[ \t]*\\(.*\\)")) 2844 ;; then: help completion 2845 (if singular-help-topics-alist 2846 (singular-completion-do (match-string 2) (match-beginning 2) 2847 end singular-help-topics-alist) 2848 (message "Completion of Singular help topics disabled.") 2849 (ding))) 2850 ((save-excursion 2851 (goto-char post-prompt) 2852 (looking-at "[ \t]*\\(example \\)[ \t]*\\(.*\\)")) 2853 ;; then: example completion 2854 (if singular-help-topics-alist 2855 (singular-completion-do (match-string 2) (match-beginning 2) 2856 end singular-examples-alist) 2857 (message "Completion of Singular help topics disabled.") 2858 (ding))) 2859 (t 2842 2860 ;; else: command completion 2843 2861 (save-excursion … … 2848 2866 end singular-commands-alist) 2849 2867 (message "Completion of Singular commands disabled.") 2850 (ding)))))) 2868 (ding))))))) 2851 2869 ;;}}} 2852 2870 … … 3871 3889 "Interrupt the Singular process running in the current buffer. 3872 3890 If called interactiveley, asks whether to (a)bort the current Singular 3873 command, (q)uit or (r) restart the current Singular process, 3874 or (c)ontinuewithout doing anything (default).3891 command, (q)uit or (r) restart the current Singular process, or (c)ontinue 3892 without doing anything (default). 3875 3893 3876 3894 If called non-interactiveley, MODE should be one of 'abort, 'quit, 'restart, … … 3979 3997 (buffer (get-buffer buffer-name))) 3980 3998 3981 ;; make sure directory contains a "/" at the end 3982 (setq directory 3983 (concat directory 3984 ;; we check for trailing slash and backslash 3985 ;; but unconditionally insert a slash. 3986 ;; Hopefully that works on NT, too. 3987 (if (memq (aref directory 3988 (1- (length directory))) 3989 '(?/ ?\\)) 3990 "" "/"))) 3999 ;; If directory is set, make sure that it ends in a "/" at the end. 4000 ;; The check is done on both slash and backslash, but we unconditionally 4001 ;; insert a slash. Hopefully that works on NT, too. 4002 (and directory 4003 (memq (aref directory (1- (length directory))) '(?/ ?\\)) 4004 (setq directory (concat directory "/"))) 3991 4005 3992 4006 (if (not buffer)
Note: See TracChangeset
for help on using the changeset viewer.