Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
a198cc61
Commit
a198cc61
authored
Apr 24, 2001
by
Johan Sundström
Browse files
Portability fixes. Thanks, Joel and David.
parent
5d44a6ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
a198cc61
2001-04-24 Johan Sundstrm <jhs@lysator.liu.se>
* utilities.el (lyskom-set-alist): New function.
* commands1.el (lyskom-allocate-mark-type): Removed non-kosher use
of cdar and set-alist; uses the above now instead.
2001-04-23 Joel Rosdahl <joel@rosdahl.net>
Clean-up of time handling and time formatting functions.
...
...
src/commands1.el
View file @
a198cc61
...
...
@@ -1950,7 +1950,7 @@ If no such existed either, nil is returned."
(
<
i
256
))
(
when
(
not
(
assq
i
used
))
; mark type i not presently used?
(
when
list
(
if
(
=
i
(
cdar
list
))
; already named?
(
if
(
=
i
(
cd
r
(
c
ar
list
))
)
; already named?
(
setq
list
(
cdr
list
))
(
setq
found
t
))))
; neither used nor named!
(
when
(
not
found
)
...
...
@@ -1976,7 +1976,7 @@ increasing number of marks per mark type (and, when equal, by mark type)."
(
type
(
mark->mark-type
mark
))
(
tcnt
(
assq
type
cnt-alist
)))
(
when
tcnt
(
setq
tcnt
(
cdr
tcnt
)))
(
set-alist
'
cnt-alist
type
(
if
(
null
tcnt
)
1
(
1+
tcnt
))))
(
lyskom-
set-alist
cnt-alist
type
(
if
(
null
tcnt
)
1
(
1+
tcnt
))))
(
setq
mark-list
(
cdr
mark-list
)))
;; Sort the list, least-used, lowest number of mark type first:
...
...
@@ -1988,6 +1988,7 @@ increasing number of marks per mark type (and, when equal, by mark type)."
(
t
nil
)))))))
;;; ================================================================
;;; ]terse alla markerade - Review marked texts
...
...
src/utilities.el
View file @
a198cc61
...
...
@@ -253,6 +253,24 @@ Returns t if the feature is loaded or can be loaded, and nil otherwise."
(
lyskom-next-apo-timeout
)
(
accept-process-output
nil
0
lyskom-apo-timeout
))
(
defun
lyskom-current-time
(
&optional
secs
)
"Return the time in a format that LysKOM understands.
If optional argument SECS is set, it is used in place of the value
of \(current-time\)."
(
let
((
time
(
decode-time
(
or
secs
(
current-time
)))))
(
setcar
(
cdr
(
cdr
(
cdr
(
cdr
time
))))
(
1-
(
car
(
cdr
(
cdr
(
cdr
(
cdr
time
)))))))
(
setcar
(
cdr
(
cdr
(
cdr
(
cdr
(
cdr
time
)))))
(
-
(
car
(
cdr
(
cdr
(
cdr
(
cdr
(
cdr
time
))))))
1900
))
time
))
(
defun
lyskom-set-alist
(
alist
item
value
)
"Modify an alist ALIST to set item ITEM to the value VALUE."
(
let
((
pair
(
assq
item
alist
)))
(
if
pair
(
progn
(
setcdr
pair
value
)
alist
)
(
cons
(
cons
item
value
)
alist
))))
;;;
;;; LysKOM utility functions
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment