/[cmucl]/src/hemlock/abbrev.lisp
ViewVC logotype

Diff of /src/hemlock/abbrev.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ram, Wed May 9 13:02:51 1990 UTC revision 1.2 by ram, Fri Feb 11 21:54:44 1994 UTC
# Line 1  Line 1 
1  ;;; -*- Log: hemlock.log; Package: Hemlock -*-  ;;; -*- Log: hemlock.log; Package: Hemlock -*-
2  ;;;  ;;;
3  ;;; **********************************************************************  ;;; **********************************************************************
4  ;;; This code was written as part of the Spice Lisp project at  ;;; This code was written as part of the CMU Common Lisp project at
5  ;;; Carnegie-Mellon University, and has been placed in the public domain.  ;;; Carnegie Mellon University, and has been placed in the public domain.
6  ;;; Spice Lisp is currently incomplete and under active development.  ;;; If you want to use this code or any part of CMU Common Lisp, please contact
7  ;;; If you want to use this code or any part of Spice Lisp, please contact  ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
8  ;;; Scott Fahlman (FAHLMAN@CMUC).  ;;;
9    (ext:file-comment
10      "$Header$")
11    ;;;
12  ;;; **********************************************************************  ;;; **********************************************************************
13  ;;;  ;;;
14  ;;;                  Hemlock Word Abbreviation Mode  ;;;                  Hemlock Word Abbreviation Mode
# Line 326  Line 329 
329    If called with a prefix argument, deletes all global abbrevs."    If called with a prefix argument, deletes all global abbrevs."
330    "Deletes the global word abbreviation named Abbrev.  If P is true,    "Deletes the global word abbreviation named Abbrev.  If P is true,
331    deletes all global abbrevs."    deletes all global abbrevs."
   (declare (ignore p))  
332    (if p    (if p
333        (setq *global-abbrev-table* (make-hash-table :test #'equal))        (setq *global-abbrev-table* (make-hash-table :test #'equal))
334        (let ((down        (let ((down
# Line 511  Line 513 
513               :default (value abbrev-pathname-defaults)               :default (value abbrev-pathname-defaults)
514               :must-exist nil)))               :must-exist nil)))
515    (with-open-file (file (value abbrev-pathname-defaults) :direction :input    (with-open-file (file (value abbrev-pathname-defaults) :direction :input
516                          :element-type 'string-char :if-does-not-exist :error)                          :element-type 'base-char :if-does-not-exist :error)
517      (read-abbrevs file)))      (read-abbrevs file)))
518    
519    
# Line 585  Line 587 
587             :help "Name of the file to write current abbrevs to."             :help "Name of the file to write current abbrevs to."
588             :must-exist nil)))             :must-exist nil)))
589    (with-open-file (file filename :direction :output    (with-open-file (file filename :direction :output
590                          :element-type 'string-char :if-exists :supersede                          :element-type 'base-char :if-exists :supersede
591                          :if-does-not-exist :create)                          :if-does-not-exist :create)
592      (multiple-value-bind (x mode-tables) (count-abbrevs)      (multiple-value-bind (x mode-tables) (count-abbrevs)
593        (declare (ignore x))        (declare (ignore x))
# Line 627  Line 629 
629    
630    
631  (defun write-incremental (mode filename)  (defun write-incremental (mode filename)
632    (with-open-file (file filename :direction :output :element-type 'string-char    (with-open-file (file filename :direction :output
633                            :element-type 'base-char
634                          :if-exists mode :if-does-not-exist :create)                          :if-exists mode :if-does-not-exist :create)
635      (dolist (def *new-abbrevs*)      (dolist (def *new-abbrevs*)
636        (let ((abb (car def))        (let ((abb (car def))

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.5