Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
climacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
climacs
climacs
Commits
e7a7bc49
Commit
e7a7bc49
authored
Aug 11, 2006
by
David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some (of my) logic errors for mode-lines. Non-existent
mode lines now handled less gracelessly.
parent
fab40715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
core.lisp
core.lisp
+15
-11
No files found.
core.lisp
View file @
e7a7bc49
...
...
@@ -502,8 +502,9 @@ spaces only."))
(
nreverse
pairs
)))
(
defun
split-attribute-line
(
line
)
(
mapcar
(
lambda
(
pair
)
(
split-attribute
pair
#\:
))
(
split-attribute
line
#\;
)))
(
when
line
(
mapcar
(
lambda
(
pair
)
(
split-attribute
pair
#\:
))
(
split-attribute
line
#\;
))))
(
defun
find-attribute-line-position
(
buffer
)
(
let
((
scan
(
beginning-of-buffer
(
clone-mark
(
point
buffer
)))))
...
...
@@ -540,21 +541,24 @@ spaces only."))
end-scan
)))))))))
(
defun
get-attribute-line
(
buffer
)
(
multiple-value-bind
(
start-mark
end-mark
)
(
find-attribute-line-position
buffer
)
(
let
((
line
(
buffer-substring
buffer
(
offset
start-mark
)
(
offset
end-mark
))))
(
when
(
>=
(
length
line
)
6
)
(
let
((
end
(
search
"-*-"
line
:from-end
t
:start2
3
)))
(
when
end
(
string-trim
'
(
#\Space
#\Tab
)
(
subseq
line
3
end
))))))))
(
multiple-value-bind
(
start-mark
end-mark
)
(
find-attribute-line-position
buffer
)
(
when
(
and
start-mark
end-mark
)
(
let
((
line
(
buffer-substring
buffer
(
offset
start-mark
)
(
offset
end-mark
))))
(
when
(
>=
(
length
line
)
6
)
(
let
((
end
(
search
"-*-"
line
:from-end
t
:start2
3
)))
(
when
end
(
string-trim
'
(
#\Space
#\Tab
)
(
subseq
line
3
end
)))))))))
(
defun
replace-attribute-line
(
buffer
new-attribute-line
)
(
let
((
full-attribute-line
(
concatenate
'string
"-*- "
new-attribute-line
"-*-"
)))
(
multiple-value-bind
(
start-mark
end-mark
)
(
find-attribute-line-position
buffer
)
(
multiple-value-bind
(
start-mark
end-mark
)
(
find-attribute-line-position
buffer
)
(
cond
((
not
(
null
end-mark
))
;; We have an existing attribute line.
(
delete-region
start-mark
end-mark
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment