Changeset 7a2c98 in git


Ignore:
Timestamp:
Aug 16, 1999, 1:10:10 PM (25 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
0feaf7307becc3179ac197c2ec6f543f777acbe2
Parents:
58c9f65172cfda441af5b182b6a670ffb8094e4f
Message:
* generation of lib-completion


git-svn-id: file:///usr/local/Singular/svn/trunk@3445 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
emacs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • emacs/cmpl.pl

    r58c9f6 r7a2c98  
    11#!/usr/local/bin/perl
    2 # $Id: cmpl.pl,v 1.2 1999-07-21 12:13:10 obachman Exp $
     2# $Id: cmpl.pl,v 1.3 1999-08-16 11:10:09 obachman Exp $
    33###################################################################
    44#
     
    88####
    99$Usage = <<EOT;
    10 $0 [-Singular binary] [-hlp file] [cmpl 'hlp|cmd'] [-help]
     10$0 [-Singular binary] [-hlp file] [cmpl 'hlp|cmd|lib'] [-help]
    1111Generates completion strings for singular emacs mode and prints it to STDOUT
    1212EOT
     
    4242  @strings = split(/\s+/, $strings);
    4343}
     44elsif ($cmpl eq 'lib')
     45{
     46  @strings = split(/\s+/, <>);
     47}
    4448elsif ($cmpl eq 'hlp')
    4549{
     
    6064        s/(.*) <\d+>$/$1/;
    6165        s/^\s*(.*)\s*/$1/;
    62         s/([\\#"])/\\$1/g;
     66        s/([\\#"])/\\$1/g; #'
    6367        push @strings, $_ if $_ && $_ ne $prev;
    6468        $prev = $_;
     
    7579print STDOUT <<EOT;
    7680; Do not edit this file: It was automatically generated by $0
    77 (setq singular-completion-$cmpl-list
     81(setq singular-completion-$cmpl-alist
    7882  '(
    7983EOT
     
    8690
    8791print STDOUT "))\n";
     92
  • emacs/singular.el

    r58c9f6 r7a2c98  
    11;;; singular.el --- Emacs support for Computer Algebra System Singular
    22
    3 ;; $Id: singular.el,v 1.31 1999-08-11 12:51:59 wichmann Exp $
     3;; $Id: singular.el,v 1.32 1999-08-16 11:10:10 obachman Exp $
    44
    55;;; Commentary:
     
    611611(defun singular-menu-install-libraries ()
    612612  "Updates the singular command menu with libraries.
    613 Go through the alist `singular-completion-library-list' and for
     613Go through the alist `singular-completion-lib-alist' and for
    614614each entry add a new menu element in the submenu
    615615(\"Commands\" \"libraries\")."          ;" font-lock trick.
    616   (let ((libs (sort singular-completion-library-list
     616  (let ((libs (sort singular-completion-lib-alist
    617617                    (function (lambda (a b)
    618618                                (string< (car b) (car a))))))
     
    24722472
    24732473;;{{{ Filename, Command, and Help Completion
    2474 (defvar singular-completion-cmd-list nil
     2474(defvar singular-completion-cmd-alist nil
    24752475  "An alist containing all Singular commands to complete.
    24762476
    24772477This variable is buffer-local.")
    24782478
    2479 (defvar singular-completion-hlp-list nil
     2479(defvar singular-completion-hlp-alist nil
    24802480  "An alist containg all Singular help topics to complete.
    24812481
     
    24872487
    24882488This function is called at mode initialization time."
    2489   (make-local-variable 'singular-completion-cmd-list)
    2490   (setq singular-completion-cmd-list nil)
    2491   (make-local-variable 'singular-completion-hlp-list)
    2492   (setq singular-completion-hlp-list nil))
     2489  (make-local-variable 'singular-completion-cmd-alist)
     2490  (setq singular-completion-cmd-alist nil)
     2491  (make-local-variable 'singular-completion-hlp-alist)
     2492  (setq singular-completion-hlp-alist nil))
    24932493
    24942494(defun singular-completion-do (pattern beg end completion-alist)
     
    25362536                               end t))
    25372537          ;; then: help completion
    2538           (if singular-completion-hlp-list
     2538          (if singular-completion-hlp-alist
    25392539              (singular-completion-do (match-string 2) (match-beginning 2)
    2540                                       end singular-completion-hlp-list)
     2540                                      end singular-completion-hlp-alist)
    25412541            (message "Completion of Singular help topics disabled.")
    25422542            (ding))
     
    25452545          (skip-chars-backward "a-zA-Z0-9")
    25462546          (setq beg (point)))
    2547         (if singular-completion-cmd-list
     2547        (if singular-completion-cmd-alist
    25482548            (singular-completion-do (buffer-substring beg end) beg
    2549                                     end singular-completion-cmd-list)
     2549                                    end singular-completion-cmd-alist)
    25502550          (message "Completion of Singular commands disabled.")
    25512551          (ding))))))
Note: See TracChangeset for help on using the changeset viewer.