Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambdaplusplus
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephen D
lambdaplusplus
Commits
d832f2ca
Commit
d832f2ca
authored
2 weeks ago
by
Stephen D
Browse files
Options
Downloads
Patches
Plain Diff
beginnings of emacs mode
parent
fa3ca319
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lpp-mode.el
+46
-0
46 additions, 0 deletions
lpp-mode.el
with
46 additions
and
0 deletions
lpp-mode.el
0 → 100644
+
46
−
0
View file @
d832f2ca
(
defvar
lpp-mode-hook
nil
)
(
defvar
lpp-mode-map
(
let
((
map
(
make-keymap
)))
(
define-key
map
(
kbd
"C-\\"
)
(
lambda
()
(
interactive
)
(
insert
"\\"
)))
(
define-key
map
(
kbd
"\\"
)
"λ"
)
map
)
"Keymap for LPP major mode"
)
(
defun
lpp-indent-line
())
; todo
(
defconst
lpp--token-syntax-types
'
((
(
"#.*"
.
font-lock-comment-face
)
(
"$\\w*"
.
font-lock-variable-name-face
)
(
"λ\\w*"
.
font-lock-builtin-face
)
)
nil
nil
nil
))
(
defconst
lpp--syntax-table
(
let
((
table
(
make-syntax-table
)))
(
modify-syntax-entry
?\/
"<"
table
)
(
modify-syntax-entry
?\n
">"
table
)
table
)
"Syntax table for lpp-mode."
)
;;;###autoload
(
defgroup
lpp
nil
"Major mode for editing λ++ code."
:prefix
'lpp
:group
'languages
)
;;;###autoload
(
define-derived-mode
lpp-mode
prog-mode
"lpp"
"Major mode for editing λ++ source code."
:syntax-table
lpp--syntax-table
:group
'lpp
(
setq-local
font-lock-defaults
lpp--token-syntax-types
)
(
use-local-map
lpp-mode-map
)
(
set
(
make-local-variable
'indent-line-function
)
'lpp-indent-line
)
(
run-hooks
'lpp-mode-hook
))
;;;###autoload
(
add-to-list
'auto-mode-alist
'
(
"\\.lpp\\'"
.
lpp-mode
))
;;;###autoload
(
add-to-list
'interpreter-mode-alist
'
(
"lpp"
.
lpp-mode
))
(
provide
'lpp-mode
)
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