Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
218a3e84
Commit
218a3e84
authored
30 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Update for infix and flush slave-like stuff.
parent
fc6c16a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hemlock/dylan.lisp
+44
-61
44 additions, 61 deletions
hemlock/dylan.lisp
with
44 additions
and
61 deletions
hemlock/dylan.lisp
+
44
−
61
View file @
218a3e84
...
...
@@ -4,79 +4,62 @@
;;; Copyright (c) 1993 Carnegie Mellon University, all rights reserved.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/dylan.lisp,v 1.
1
199
3
/0
7
/2
2
1
1:42:52 wlott
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/dylan.lisp,v 1.
2
199
4
/0
8
/2
1
1
5:17:15 ram
Exp $"
)
;;;
;;; **********************************************************************
;;;
;;; This file contains stuff that lives in the editor to make slaves and dylan
;;; interact better.
;;; This file contains a minimal dylan mode.
;;;
(
in-package
"HEMLOCK"
)
(
defmode
"Dylan"
:major-p
nil
)
;;; hack ..
(
setf
(
getstring
"dylan"
*mode-names*
)
nil
)
(
defmode
"Dylan"
:major-p
t
)
(
defcommand
"Dylan Mode"
(
p
)
"Put the current buffer into \"Dylan\" mode."
"Put the current buffer into \"Dylan\" mode."
(
declare
(
ignore
p
))
(
setf
(
buffer-major-mode
(
current-buffer
))
"Dylan"
))
(
define-file-type-hook
(
"dylan"
)
(
buffer
type
)
(
declare
(
ignore
type
))
(
setf
(
buffer-major-mode
buffer
)
"Lisp"
)
(
setf
(
buffer-minor-mode
buffer
"Dylan"
)
t
))
(
setf
(
buffer-major-mode
buffer
)
"Dylan"
))
(
define-file-option
"Module"
(
buffer
value
)
(
defhvar
"Current Package"
"The package used for evaluation of Lisp in this buffer."
:buffer
buffer
:value
(
let*
((
eof
(
list
nil
))
(
thing
(
read-from-string
value
nil
eof
)))
(
when
(
eq
thing
eof
)
(
error
"Bad module file option value."
))
(
cond
((
stringp
thing
)
thing
)
((
symbolp
thing
)
(
symbol-name
thing
))
((
characterp
thing
)
(
string
thing
))
(
t
(
message
"Ignoring \"module\" file option -- cannot convert to a string."
))))))
(
defhvar
"Indent Function"
"Indentation function which is invoked by \"Indent\" command.
It must take one argument that is the prefix argument."
:value
#'
generic-indent
:mode
"Dylan"
)
(
defcommand
"Set Buffer Module"
(
p
)
"Set the module to be used by Dylan evaluation and compilation commands
while in this buffer. When in a slave's interactive buffers, do NOT
set the editor's module variable, but changed the slave's *current-module*."
"Prompt for a module to make into a buffer-local variable current-package."
(
declare
(
ignore
p
))
(
let*
((
name
(
string
(
prompt-for-expression
:prompt
"Module name: "
:help
"Name of module to associate with this buffer."
)))
(
buffer
(
current-buffer
))
(
info
(
value
current-eval-server
)))
(
cond
((
and
info
(
or
(
eq
(
server-info-slave-buffer
info
)
buffer
)
(
eq
(
server-info-background-buffer
info
)
buffer
)))
(
wire:remote
(
server-info-wire
info
)
(
server-set-module
name
))
(
wire:wire-force-output
(
server-info-wire
info
)))
(
t
(
defhvar
"Current Package"
"The package used for evaluation of Lisp in this buffer."
:buffer
buffer
:value
name
)))
(
when
(
buffer-modeline-field-p
buffer
:package
)
(
dolist
(
w
(
buffer-windows
buffer
))
(
update-modeline-field
buffer
w
:package
)))))
(
defhvar
"Auto Fill Space Indent"
"When non-nil, uses \"Indent New Comment Line\" to break lines instead of
\"New Line\"."
:mode
"Dylan"
:value
t
)
(
defhvar
"Comment Start"
"String that indicates the start of a comment."
:mode
"Dylan"
:value
"//"
)
;;; DYLAN-MODE-P -- interface.
;;;
;;; Called by various functions if they want their behavior to be different
;;; under dylan.
;;;
(
defun
dylan-mode-p
(
&optional
(
buffer
(
current-buffer
)))
(
buffer-minor-mode
buffer
"Dylan"
))
(
defhvar
"Comment End"
"String that ends comments. Nil indicates #\newline termination."
:mode
"Dylan"
:value
nil
)
(
defcommand
"Dylan Mode"
(
p
)
"Toggles the Dylan minor mode in the current buffer."
"Toggles the Dylan minor mode in the current buffer."
(
declare
(
ignore
p
))
(
setf
(
buffer-minor-mode
(
current-buffer
)
"Dylan"
)
(
not
(
dylan-mode-p
(
current-buffer
)))))
(
defhvar
"Comment Begin"
"String that is inserted to begin a comment."
:mode
"Dylan"
:value
"// "
)
(
bind-key
"Delete Previous Character Expanding Tabs"
#
k
"backspace"
:mode
"Dylan"
)
(
bind-key
"Delete Previous Character Expanding Tabs"
#
k
"delete"
:mode
"Dylan"
)
;;; hacks...
(
shadow-attribute
:scribe-syntax
#\<
nil
"Dylan"
)
(
shadow-attribute
:scribe-syntax
#\>
nil
"Dylan"
)
(
bind-key
"Self Insert"
#
k
"\>"
:mode
"Dylan"
)
(
bind-key
"Scribe Insert Bracket"
#
k
")"
:mode
"Dylan"
)
(
bind-key
"Scribe Insert Bracket"
#
k
"]"
:mode
"Dylan"
)
(
bind-key
"Scribe Insert Bracket"
#
k
"}"
:mode
"Dylan"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment