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
65cba0e1
Commit
65cba0e1
authored
Jan 07, 2002
by
David Byers
Browse files
Manipulering av aux-items med musen i editbufferen (bug 289 klar).
parent
3cc53d81
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
65cba0e1
2002-01-07 David Byers <davby@ida.liu.se>
* edit-text.el (lyskom-edit-insert-miscs): Place add button after
aux-items. Make a button out of the aux-item prefix.
(lyskom-edit-insert-aux-item): Place new aux-items before add
button.
(lyskom-edit-parse-headers): Use aux-item-prefix-regexp
(lyskom-edit-on-aux-item): Same here.
* utilities.el (lyskom-parse-date): New function (not complete)
that can be used to translate a string to a date specification.
* vars.el.in (lyskom-button-actions): Changed add-recipient to
add-recipient-or-xref and added choices for aux-items.
2002-01-03 David Byers <davby@ida.liu.se>
* commands2.el (kom-set-unread): Reindented.
...
...
src/check-strings.el
View file @
65cba0e1
...
...
@@ -49,8 +49,8 @@
(
lcs-message
t
"Checking customizeable variables"
)
(
lcs-check-customize-variables
)
(
lcs-message
t
"Checking help strings"
)
(
lcs-check-help-strings
)
;
(lcs-message t "Checking help strings")
;
(lcs-check-help-strings)
(
or
noninteractive
(
display-buffer
lcs-message-buffer
)))
...
...
@@ -69,12 +69,13 @@
(
defun
lcs-check-category
(
category
)
"Check the strings in CATEGORY."
(
lcs-message
t
"Checking category %s"
category
)
(
let
((
strings
(
lcs-all-category-string
category
)))
(
while
strings
(
lcs-check-strings
category
(
car
(
car
strings
))
(
cdr
(
car
strings
)))
(
setq
strings
(
cdr
strings
)))))
(
unless
(
eq
category
'lyskom-help-strings
)
(
lcs-message
t
"Checking category %s"
category
)
(
let
((
strings
(
lcs-all-category-string
category
)))
(
while
strings
(
lcs-check-strings
category
(
car
(
car
strings
))
(
cdr
(
car
strings
)))
(
setq
strings
(
cdr
strings
))))))
(
defun
lcs-all-category-string
(
category
)
"Returns list of names for CATEGORY, and their strings."
...
...
@@ -269,6 +270,7 @@ Check that all server-stored variables are customizeable."
(
defun
lcs-check-help-strings
()
"Check help strings"
(
lcs-check-category
'lyskom-help-strings
)
(
let
((
commands
(
mapcar
'car
(
lcs-all-category-string
'lyskom-command
)))
...
...
src/distribution-README
View file @
65cba0e1
...
...
@@ -43,7 +43,7 @@
*
XEmacs
version
20.4
,
21.1
and
21.2
.
*
Gnu
Emacs
version
19.34
[
1
]
*
Gnu
Emacs
version
20.
5
and
newer
[
2
]
*
Gnu
Emacs
version
20.
7
and
newer
[
2
]
[
1
]
You
'll have to replace the included custom package, and if you
use Gnus, you may have to update that as well.
...
...
@@ -91,7 +91,7 @@
<
URL
:
http
://
www
.
cs
.
indiana
.
edu
/
elisp
/
w3
/
w3
.
html
>
and
included
in
many
distributions
of
Emacs
.
If
w3
is
not
installed
,
LysKOM
will
be
unable
to
display
HTML
.
*
calc
(
optional
)
LysKOM
uses
calc
to
implement
the
"Compute"
command
.
If
you
want
...
...
@@ -241,8 +241,11 @@
3. Reporting bugs
Before reporting a bug, please check that it is not one of the
known issues below. Report bugs to bug-lyskom@lysator.liu.se.
Please give us the following information (at least):
known issues below. Please report bugs by posting them to the
bugzilla at http://bugzilla.lysator.liu.se/. You can also e-mail
bug reports to bug-lyskom@lysator.liu.se.
To evaluate your bug report we need the following information:
o The LysKOM version you are using. This is shown when you start
LysKOM and is also contained in the variable
...
...
@@ -259,10 +262,11 @@
which
packages
you
have
loaded
.
If
possible
,
try
to
reproduce
the
bug
with
Emacs
started
with
the
-
q
command
line
switch
.
The
command
kom
-
bug
-
report
may
come
in
handy
.
It
gives
us
a
lot
of
information
that
you
might
not
think
of
(
such
as
what
the
internal
data
structures
look
like
).
The
command
kom
-
bug
-
report
may
come
in
handy
.
It
gives
us
a
lot
of
information
that
you
might
not
think
of
(
such
as
what
the
internal
data
structures
look
like
).
If
you
post
a
bug
report
to
our
bugzilla
,
please
make
the
result
of
kom
-
bug
-
report
an
attachment
to
your
bug
report
.
4.
Known
issues
...
...
src/edit-text.el
View file @
65cba0e1
...
...
@@ -209,11 +209,6 @@ nil -> Ingenting."
(
lyskom-get-string
'footnote
)
where-put-misc
data
)))
(
setq
misc-list
(
cdr
misc-list
))))
(
lyskom-princ
(
lyskom-format
"%[%#1@%#2s%]\n"
(
lyskom-default-button
'add-recipient
edit-buffer
)
(
lyskom-get-string
'add-recpt-button-text
))
where-put-misc
)
(
mapcar
(
function
(
lambda
(
item
)
(
let
((
data
(
lyskom-aux-item-call
...
...
@@ -221,9 +216,19 @@ nil -> Ingenting."
item
lyskom-pers-no
)))
(
when
data
(
lyskom-princ
(
concat
(
lyskom-get-string
'aux-item-prefix
)
data
"\n"
)
(
lyskom-format
"%#1@%[%#3s%] %#2s\n"
(
lyskom-default-button
'aux-edit-menu
(
cons
edit-buffer
(
copy-marker
where-put-misc
)))
data
(
lyskom-get-string
'aux-item-prefix
))
where-put-misc
)))))
aux-list
)
(
lyskom-princ
(
lyskom-format
"%[%#1@%#2s%]\n"
(
lyskom-default-button
'add-recipient-or-xref
edit-buffer
)
(
lyskom-get-string
'add-recpt-button-text
))
where-put-misc
)
(
lyskom-princ
(
lyskom-format
'text-mass
subject
(
substitute-command-keys
(
lyskom-get-string
'header-separator
))
...
...
@@ -1358,10 +1363,10 @@ RECPT-TYPE is the type of recipient to add."
"$"
)
nil
t
)
(
beginning-of-line
)
(
forward-line
-
1
)
(
forward-line
-
2
)
(
insert
(
concat
(
lyskom-format
(
format
"%%#1@%%[%s%%]%%#2s"
(
lyskom-get-string
'aux-item-prefix
))
(
format
"%%#1@%%[%s%%]
%%#2s"
(
lyskom-get-string
'aux-item-prefix
))
(
lyskom-default-button
'aux-edit-menu
(
cons
(
current-buffer
)
(
point-marker
)))
(
lyskom-aux-item-call
item
...
...
@@ -1548,7 +1553,7 @@ easy to use the result in a call to `lyskom-create-misc-list'."
((
lyskom-looking-at-header
'header-subject
nil
)
(
setq
subject
(
lyskom-edit-extract-subject
)))
((
lyskom-looking-at
(
lyskom-get-string
'aux-item-prefix
))
((
lyskom-looking-at
(
lyskom-get-string
'aux-item-prefix
-regexp
))
(
goto-char
(
match-end
0
))
(
let
((
item
(
lyskom-edit-parse-aux-item
)))
(
if
item
...
...
@@ -1636,7 +1641,7 @@ Point must be located on the line where the subject is."
"Return non-nil if point is on the same line as an aux-item"
(
save-excursion
(
beginning-of-line
)
(
and
(
lyskom-looking-at
(
lyskom-get-string
'aux-item-prefix
))
(
and
(
lyskom-looking-at
(
lyskom-get-string
'aux-item-prefix
-regexp
))
(
re-search-forward
(
concat
"^"
(
regexp-quote
(
substitute-command-keys
...
...
src/english-strings.el
View file @
65cba0e1
...
...
@@ -815,11 +815,13 @@ Text %#1n has more than one root but only one of the trees will be shown.\n")
(carbon-copy-prefix . "
[Cc]\\
(
[Aa]\\|[Cc]\\)")
(blank-carbon-copy-prefix . "[Bb]\\([Ll]\\|[Cc][Cc]\\
)
")
(add-recipient . "
Add
a
recipient
")
(add-recipient-or-xref . "
Add...
")
(secret-aux-flag . "
secret
")
(anonymous-aux-flag . "
anonymous
")
(inherit-aux-flag . "
inherited
")
(aux-item-prefix . "
>
")
(aux-item-prefix . "
[*]
")
(aux-item-prefix-regexp . "
\\[\\*\\]\\s-*
")
(comment-item-prefix . "
#\\s-*
")
(text-no-comment . "
%#1d
%#2s
/%#3d
line%#3?d%[%]%[s%]/
%#4P
%#5?b%[
[anonymous]%]%[%]\n
")
(cant-fcc-text-file-error . "
Unable
to
save
text
%#1n
to
\"%#2s\"
(
%#3s:
%#4s
)
.
\n
")
...
...
@@ -1269,7 +1271,7 @@ Text:
(aux-popup-title . "
Extra
information
")
(timestamp-popup-title . "
Timestamp
%#1s
")
(recpt-type-popup-title . "
Recipient
type:
%#1s
")
(add-recpt-button-text . "
[Add
recipient
]
")
(add-recpt-button-text . "
[Add
...
]
")
(add-recpt-button-text-regex . "
\\[Add
recipient\\]
")
(generic-popup-title . "
%#1s
")
...
...
@@ -1292,7 +1294,12 @@ On since %#8s%#9s")
(one-day . "
one
day
")
(one-hour . "
one
hour
")
(one-minute . "
one
minute
")
(years . "
years
")
(year . "
r
")
(month . "
month
")
(months . "
months
")
(days . "
days
")
(day . "
day
")
(hours . "
hours
")
(minutes . "
minutes
")
(and . "
and
")
...
...
@@ -1590,6 +1597,13 @@ You must become an active member of the conference to enter it.\n")
(
lyskom-button-recpt-type-copy
.
"Carbon copy"
)
(
lyskom-button-recpt-type-bcc
.
"Blind Carbon copy"
)
(
lyskom-button-recpt-type-sub
.
"Remove"
)
(
lyskom-button-recpt-add-recipient
.
"Recipient"
)
(
lyskom-button-recpt-add-copy
.
"Carbon copy recipient"
)
(
lyskom-button-recpt-add-bcc
.
"Blind carbon copy recipient"
)
(
lyskom-button-aux-type-xref
.
"Referenc till conference/person/text"
)
(
lyskom-button-aux-type-no-comments
.
"Request no comments"
)
(
lyskom-button-aux-type-personal-comments
.
"Request personal reply"
)
(
lyskom-edit-toggle-secret-aux-action
.
"Toggle \"secret\""
)
(
lyskom-edit-toggle-anonymous-aux-action
.
"Toggle \"anonymous\""
)
(
lyskom-edit-toggle-inherit-aux-action
.
"Toggle \"inherited\""
)
...
...
@@ -1601,6 +1615,21 @@ You must become an active member of the conference to enter it.\n")
))
(
lyskom-language-var
lyskom-month-names
sv
'
((
"jan"
.
1
)
(
"januari"
.
1
)
(
"feb"
.
2
)
(
"februari"
.
2
)
(
"mar"
.
3
)
(
"march"
.
3
)
(
"apr"
.
4
)
(
"april"
.
4
)
(
"may"
.
5
)
(
"may"
.
5
)
(
"jun"
.
6
)
(
"june"
.
6
)
(
"jul"
.
7
)
(
"july"
.
7
)
(
"aug"
.
8
)
(
"august"
.
8
)
(
"sep"
.
9
)
(
"september"
.
9
)
(
"oct"
.
10
)
(
"october"
.
10
)
(
"nov"
.
11
)
(
"november"
.
11
)
(
"dec"
.
12
)
(
"december"
.
12
)))
;;; ================================================================
;;; The commands and their associated functions
...
...
src/swedish-strings.el
View file @
65cba0e1
...
...
@@ -814,11 +814,13 @@ M
(carbon-copy-prefix . "
[Ee]
")
(blank-carbon-copy-prefix . "
[Dd]
")
(add-recipient . "
Addera
mottagare
")
(add-recipient-or-xref . "
Addera...
")
(secret-aux-flag . "
hemlig
")
(anonymous-aux-flag . "
anonym
")
(inherit-aux-flag . "
rvd
")
(aux-item-prefix . "
>
")
(aux-item-prefix . "
[*]
")
(aux-item-prefix-regexp . "
\\[\\*\\]\\s-*
")
(comment-item-prefix . "
#\\s-*
")
(text-no-comment . "
%#1d
%#2s
/%#3d
rad%#3?d%[%]%[er%]/
%#4P
%#5?b%[
[anonymt]%]%[%]\n
")
(cant-fcc-text-file-error . "
Kan
inte
spara
inlgg
%#1n
till
\"%#2s\"
(
%#3s:
%#4s
)
.
\n
")
...
...
@@ -1268,8 +1270,8 @@ Text:
(aux-popup-title . "
Tillggsinformation
")
(timestamp-popup-title . "
Tidsstmpel
%#1s
")
(recpt-type-popup-title . "
Mottagartyp:
%#1s
")
(add-recpt-button-text . "
[Addera
mottagare
]
")
(add-recpt-button-text-regex . "
\\[Addera
mottagare
\\]
")
(add-recpt-button-text . "
[Addera
...
]
")
(add-recpt-button-text-regex . "
\\[Addera
\.\.\.
\\]
")
(generic-popup-title . "
%#1s
")
(who-i-am-not-present . "
%#1P
r
inte
nrvarande
i
ngot
mte\n
")
...
...
@@ -1291,7 +1293,12 @@ Uppkopplad sedan %#8s%#9s")
(one-day . "
en
dag
")
(one-hour . "
en
timme
")
(one-minute . "
en
minut
")
(years . "
r
")
(year . "
r
")
(months . "
mnader
")
(month . "
mnad
")
(days . "
dagar
")
(day . "
dag
")
(hours . "
timmar
")
(minutes . "
minuter
")
(and . "
och
")
...
...
@@ -1589,6 +1596,13 @@ Du m
(
lyskom-button-recpt-type-copy
.
"Extra kopia"
)
(
lyskom-button-recpt-type-bcc
.
"Dold kopia"
)
(
lyskom-button-recpt-type-sub
.
"Subtrahera"
)
(
lyskom-button-recpt-add-recipient
.
"Mottagare"
)
(
lyskom-button-recpt-add-copy
.
"Extra-kopiemottagare"
)
(
lyskom-button-recpt-add-bcc
.
"Dold-kopiamottagare"
)
(
lyskom-button-aux-type-xref
.
"Referens till mte/person/inlgg"
)
(
lyskom-button-aux-type-no-comments
.
"Begran om inga kommentarer"
)
(
lyskom-button-aux-type-personal-comments
.
"Begran om personligt svar"
)
(
lyskom-edit-toggle-secret-aux-action
.
"Vxla \"hemlig\""
)
(
lyskom-edit-toggle-anonymous-aux-action
.
"Vxla \"anonym\""
)
(
lyskom-edit-toggle-inherit-aux-action
.
"Vxla \"rvd\""
)
...
...
@@ -1598,6 +1612,20 @@ Du m
(
lyskom-prioritize-flag-clear-action
.
"Stng av"
)
))
(
lyskom-language-var
lyskom-month-names
sv
'
((
"jan"
.
1
)
(
"januari"
.
1
)
(
"feb"
.
2
)
(
"februari"
.
2
)
(
"mar"
.
3
)
(
"mars"
.
3
)
(
"apr"
.
4
)
(
"april"
.
4
)
(
"maj"
.
5
)
(
"maj"
.
5
)
(
"jun"
.
6
)
(
"juni"
.
6
)
(
"jul"
.
7
)
(
"juli"
.
7
)
(
"aug"
.
8
)
(
"augusti"
.
8
)
(
"sep"
.
9
)
(
"september"
.
9
)
(
"okt"
.
10
)
(
"oktober"
.
10
)
(
"nov"
.
11
)
(
"november"
.
11
)
(
"dec"
.
12
)
(
"december"
.
12
)))
;;; ================================================================
;;; The commands and their associated functions
...
...
src/utilities.el
View file @
65cba0e1
...
...
@@ -1300,3 +1300,97 @@ Returns a cons of (LOCAL . GLOBAL)"
(
setq
last-index
index
)
(
setq
index
(
+
lowest
(
/
(
-
highest
lowest
)
2
))))
(
cons
last-index
result
)))
(
defvar
lyskom-year-window-start
80
"Windowing threshold for YY year specifications.
Years below this are considered in the 21st century. Years above this
in the 20th century"
)
(
defun
lyskom-parse-date
(
arg
)
"Parse ARG as a date."
(
let
((
month-regexp
(
concat
"\\("
(
mapconcat
(
lambda
(
el
)
(
regexp-quote
(
car
el
)))
lyskom-month-names
"\\|"
)
"\\)"
))
(
dmy-regexp
(
concat
"\\("
(
mapconcat
(
lambda
(
el
)
(
regexp-quote
(
lyskom-get-string
el
)))
'
(
years
year
months
month
days
day
)
"\\|"
)
"\\)"
))
(
test-date
(
format-time-string
"%x"
'
(
20
0
)))
year
month
day
di
mi
yi
)
;; Look at test-date to see where dates in ambiguous cases should go
(
cond
((
string-match
"01.*16.*70"
test-date
)
(
setq
di
2
mi
1
yi
3
))
((
string-match
"01.*70.*16"
test-date
)
(
setq
di
3
mi
1
yi
2
))
((
string-match
"16.*01.*70"
test-date
)
(
setq
di
1
mi
2
yi
3
))
((
string-match
"16.*70.*01"
test-date
)
(
setq
di
1
mi
3
yi
2
))
((
string-match
"70.*01.*16"
test-date
)
(
setq
di
3
mi
2
yi
1
))
((
string-match
"70.*16.*01"
test-date
)
(
setq
di
2
mi
3
yi
1
)))
(
cond
((
string-match
"\\([0-9][0-9][0-9][0-9]\\)[-./]\\([0-9][0-9]?\\)[-./]\\([0-9][0-9]?\\)"
arg
)
;; YYYY-MM-DD
(
setq
year
(
string-to-int
(
match-string
1
arg
))
month
(
string-to-int
(
match-string
(
if
(
>
mi
di
)
3
2
)
arg
))
day
(
string-to-int
(
match-string
(
if
(
>
di
mi
)
2
3
)
arg
)))
(
when
(
>
month
12
)
(
setq
month
day
day
month
))
)
((
string-match
"\\([0-9][0-9]?\\)[-./]\\([0-9][0-9]?\\)[-./]\\([0-9][0-9][0-9][0-9]?\\)"
arg
)
;; YYYY-MM-DD
(
setq
year
(
string-to-int
(
match-string
3
arg
))
month
(
string-to-int
(
match-string
(
if
(
>
mi
di
)
2
1
)
arg
))
day
(
string-to-int
(
match-string
(
if
(
>
di
mi
)
1
2
)
arg
)))
(
when
(
>
month
12
)
(
setq
month
day
day
month
))
)
((
string-match
"\\([0-9][0-9]\\)[-./]\\([0-9][0-9]?\\)[-./]\\([0-9][0-9]?\\)"
arg
)
(
setq
year
(
string-to-int
(
match-string
yi
arg
))
month
(
string-to-int
(
match-string
mi
arg
))
day
(
string-to-int
(
match-string
di
arg
)))
(
when
(
>
month
12
)
(
setq
month
day
day
month
))
)
((
string-match
"\\([0-9][0-9]\\)/\\([0-9][0-9]\\)"
arg
)
;; Ambiguous:
;; MM/DD Euro
;; DD/MM US
(
let
((
a
(
string-to-int
(
match-string
1
arg
)))
(
b
(
string-to-int
(
match-string
2
arg
))))
(
cond
((
>
a
12
)
(
setq
month
b
day
a
))
((
>
b
12
)
(
setq
month
a
day
b
))
((
>
di
mi
)
(
setq
month
b
day
a
))
(
t
(
setq
month
a
day
b
))))
)
((
string-match
(
format
"%s \\([0-9][0-9]?\\)"
month-regexp
)
arg
)
;; Ambiguous:
;; Month DD
)
((
string-match
(
format
"%s,? \\([0-9][0-9][0-9][0-9]\\)"
month-regexp
)
arg
)
;; Ambiguous:
;; Month YYYY
)
((
string-match
(
format
"\\([0-9][0-9]?\\) %s"
month-regexp
)
arg
)
;; DD Month
)
((
string-match
(
format
"\\([0-9][0-9]?\\) %s \\([0-9][0-9][0-9][0-9]\\)"
month-regexp
)
arg
)
;; DD Month YYYY
)
((
string-match
(
format
"%s \\([0-9][0-9]?\\), \\([0-9][0-9][0-9]?[0-9]?\\)"
month-regexp
)
arg
)
;; Month DD, YYYY
)
((
string-match
(
format
"\\([0-9][0-9]?\\) %s, \\([0-9][0-9][0-9]?[0-9]?\\)"
month-regexp
)
arg
)
;; DD Month, YYYY
)
((
string-match
(
format
"-\\([0-9]+\\) %s"
dmy-regexp
)
arg
)
;; -NN days, months, years
)
)
(
if
(
<
year
lyskom-year-window-start
)
(
setq
year
(
+
2000
year
))
(
setq
year
(
+
1900
year
)))
(
list
year
month
day
)
))
src/vars.el.in
View file @
65cba0e1
...
...
@@ -1114,6 +1114,14 @@ each time ."
;;; Language-dependent variables
;;;
(
def-kom-var
lyskom-month-names
nil
"A list of month names.
Each element is a cons cell consisting of the name of the month
\(a symbol) and the number of the month (1-12). Each month may
appear more than once"
local
inherited
)
(
def-kom-var
lyskom-onoff-table
nil
"A completion table for on and off selections."
local
)
...
...
@@ -1273,21 +1281,36 @@ each time ."
(
lyskom-edit-sub-recipient/copy
(
car
recpt-and-buffer
)
(
cadr
recpt-and-buffer
))))))
(
add-recipient
add-recipient
(
add-recipient
-or-xref
add-recipient
-or-xref
(
lambda
(
buffer
argument
text
)
nil
)
((
lyskom-button-recpt-
type
-recipient
((
lyskom-button-recpt-
add
-recipient
.
(
lambda
(
buffer
buffer
text
)
(
set-buffer
buffer
)
(
kom-edit-add-recipient
)))
(
lyskom-button-recpt-
type
-copy
(
lyskom-button-recpt-
add
-copy
.
(
lambda
(
buffer
buffer
text
)
(
set-buffer
buffer
)
(
kom-edit-add-copy
)))
(
lyskom-button-recpt-
type
-bcc
(
lyskom-button-recpt-
add
-bcc
.
(
lambda
(
buffer
buffer
text
)
(
set-buffer
buffer
)
(
kom-edit-add-bcc
)))))
(
kom-edit-add-bcc
)))
(
lyskom-button-aux-type-xref
.
(
lambda
(
buffer
recpt-and-buffer
text
)
(
save-excursion
(
set-buffer
recpt-and-buffer
)
(
kom-edit-add-cross-reference
))))
(
lyskom-button-aux-type-no-comments
.
(
lambda
(
buffer
recpt-and-buffer
text
)
(
save-excursion
(
set-buffer
recpt-and-buffer
)
(
kom-edit-add-no-comments
))))
(
lyskom-button-aux-type-personal-comments
.
(
lambda
(
buffer
recpt-and-buffer
text
)
(
save-excursion
(
set-buffer
recpt-and-buffer
)
(
kom-edit-add-personal-comments
))))))
)
"This variable defines valid button types in LysKOM. Each element is a
list consisting of (TYPE LABEL DEFAULT ACTIONS HINTS).
...
...
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