Commit 4ec3b5ec authored by David Byers's avatar David Byers
Browse files

Added support for highlighting morons with a warning face

parent 1e454011
2000-03-26 David Byers <davby@ida.liu.se>
* vars.el.in (kom-morons): New variable.
(lyskom-faces): Added kom-morons-face.
(lyskom-face-schemes): Added kom-korons-face.
* vars.el (kom-presence-messages): Document use of morons.
* option-edit.el (lyskom-customize-buffer-format): Added kom-korons.
(lyskom-custom-variables): Added kom-morons.
* lyskom-buttons.el (lyskom-generate-button): Added support for
kom-morons.
* english-strings.el (lyskom-custom-strings): Added strings for
kom-morons.
* async.el (lyskom-show-presence): Added support for kom-morons.
2000-03-22 David Byers <davby@ida.liu.se> 2000-03-22 David Byers <davby@ida.liu.se>
* compatibility.el (signum): New compatibility function. * compatibility.el (signum): New compatibility function.
......
...@@ -321,6 +321,9 @@ this function shall be with current-buffer the BUFFER." ...@@ -321,6 +321,9 @@ this function shall be with current-buffer the BUFFER."
according to the value of FLAG." according to the value of FLAG."
(cond ((null flag) nil) (cond ((null flag) nil)
((eq flag 'friends) (memq num kom-friends)) ((eq flag 'friends) (memq num kom-friends))
((eq flag 'morons) (memq num kom-morons))
((eq flag 'friends-and-morons) (or (memq num kom-friends)
(memq num kom-morons)))
((listp flag) (memq num flag)) ((listp flag) (memq num flag))
(t t))) (t t)))
......
...@@ -2764,6 +2764,10 @@ be saved in the server. Otherwise it will be saved in your .emacs.") ...@@ -2764,6 +2764,10 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-friends-doc . "\ (kom-friends-doc . "\
The users named in this list will be displayed using a special face in The users named in this list will be displayed using a special face in
the LysKOM buffer.")
(kom-morons-doc . "\
The users named in this list will be displayed using a warning face in
the LysKOM buffer.") the LysKOM buffer.")
(kom-url-viewer-preferences-doc . "\ (kom-url-viewer-preferences-doc . "\
...@@ -3090,6 +3094,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.") ...@@ -3090,6 +3094,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(lyskom-filter-outgoing-messages-tag . "Show automatic messages:") (lyskom-filter-outgoing-messages-tag . "Show automatic messages:")
(kom-friends-tag . "Friends and other special people:") (kom-friends-tag . "Friends and other special people:")
(kom-morons-tag . "Morons and other \"special\" people:")
(kom-url-viewer-preferences-tag . "Open URLs using the following program:") (kom-url-viewer-preferences-tag . "Open URLs using the following program:")
(kom-mosaic-command-tag . "Command to start NCSA Mosaic:") (kom-mosaic-command-tag . "Command to start NCSA Mosaic:")
(kom-netscape-command-tag . "Command to start Netscape Navigator:") (kom-netscape-command-tag . "Command to start Netscape Navigator:")
......
...@@ -420,6 +420,7 @@ information." ...@@ -420,6 +420,7 @@ information."
(or face (or face
(cond ((eq persno numarg) 'kom-me-face) (cond ((eq persno numarg) 'kom-me-face)
((memq numarg kom-friends) 'kom-friends-face) ((memq numarg kom-friends) 'kom-friends-face)
((memq numarg kom-morons) 'kom-morons-face)
(t 'kom-active-face))) (t 'kom-active-face)))
'mouse-face 'kom-highlight-face 'mouse-face 'kom-highlight-face
'lyskom-button-text text 'lyskom-button-text text
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
[kom-show-since-and-when] [kom-show-since-and-when]
"\n" "\n"
[kom-friends] [kom-friends]
[kom-morons]
"\n" "\n"
[kom-presence-messages] [kom-presence-messages]
[kom-presence-messages-in-buffer] [kom-presence-messages-in-buffer]
...@@ -572,6 +573,7 @@ customize buffer but do not save them to the server." ...@@ -572,6 +573,7 @@ customize buffer but do not save them to the server."
(const (last-recipient-recpt last-recipient))))) (const (last-recipient-recpt last-recipient)))))
(lyskom-filter-outgoing-messages (noggle (yes no))) (lyskom-filter-outgoing-messages (noggle (yes no)))
(kom-friends (repeat (person nil :tag name) :indent 4)) (kom-friends (repeat (person nil :tag name) :indent 4))
(kom-morons (repeat (person nil :tag name) :indent 4))
(kom-url-viewer-preferences (repeat (url-viewer nil :tag viewer-program) (kom-url-viewer-preferences (repeat (url-viewer nil :tag viewer-program)
:indent 4)) :indent 4))
(kom-mosaic-command (file)) (kom-mosaic-command (file))
......
...@@ -2822,6 +2822,10 @@ i servern. Annars sparas det i din .emacs.") ...@@ -2822,6 +2822,10 @@ i servern. Annars sparas det i din .emacs.")
(kom-friends-doc . "\ (kom-friends-doc . "\
Namnen p personerna i denna lista kommer att visas med ett speciellt Namnen p personerna i denna lista kommer att visas med ett speciellt
utseende i LysKOM-bufferten.")
(kom-friends-doc . "\
Namnen p personerna i denna lista kommer att visas med ett varnande
utseende i LysKOM-bufferten.") utseende i LysKOM-bufferten.")
(kom-url-viewer-preferences-doc . "\ (kom-url-viewer-preferences-doc . "\
...@@ -3147,6 +3151,7 @@ i servern. Annars sparas det i din .emacs.") ...@@ -3147,6 +3151,7 @@ i servern. Annars sparas det i din .emacs.")
(lyskom-filter-outgoing-messages-tag . "Visa automatiska meddelanden:") (lyskom-filter-outgoing-messages-tag . "Visa automatiska meddelanden:")
(kom-friends-tag . "Vnner och bekanta:") (kom-friends-tag . "Vnner och bekanta:")
(kom-friends-tag . "Idioter och knppskallar:")
(kom-url-viewer-preferences-tag . "ppna URLer med fljande program:") (kom-url-viewer-preferences-tag . "ppna URLer med fljande program:")
(kom-mosaic-command-tag . "Kommando fr att starta NCSA Mosaic:") (kom-mosaic-command-tag . "Kommando fr att starta NCSA Mosaic:")
(kom-netscape-command-tag . "Kommando fr att starta Netscape Navigator:") (kom-netscape-command-tag . "Kommando fr att starta Netscape Navigator:")
......
...@@ -661,6 +661,12 @@ in lyskom-face-schemes." ...@@ -661,6 +661,12 @@ in lyskom-face-schemes."
"Initalize the faces in the LysKOM client. "Initalize the faces in the LysKOM client.
This sets the face scheme according to `kom-default-face-scheme', and This sets the face scheme according to `kom-default-face-scheme', and
also reads the proper X resources." also reads the proper X resources."
(unless (find-face 'strikethrough)
(make-face 'strikethrough)
(condition-case nil
(set-face-strikethru-p 'strikethrough t)
(error (set-face-underline-p 'strikethrough t))))
(unless kom-default-face-scheme (unless kom-default-face-scheme
(setq kom-default-face-scheme (setq kom-default-face-scheme
(condition-case nil (condition-case nil
......
...@@ -311,6 +311,11 @@ A list of integers means show messages for those users. ...@@ -311,6 +311,11 @@ A list of integers means show messages for those users.
The value 'friends means show messages for the users in kom-friends. The value 'friends means show messages for the users in kom-friends.
The value 'morons means show messages for the users in kom-morons.
The value 'friends-and-morons means show messages for the users in
kom-friends and kom-morons.
If you want the messages in the buffer you could set the variable If you want the messages in the buffer you could set the variable
kom-presence-messages-in-buffer." kom-presence-messages-in-buffer."
server) server)
...@@ -643,6 +648,10 @@ to be displayed in the buffer." ...@@ -643,6 +648,10 @@ to be displayed in the buffer."
"*List of people whose names should be formatted using kom-friends-face." "*List of people whose names should be formatted using kom-friends-face."
server) server)
(def-kom-var kom-morons nil
"*List of people whose names should be formatted using kom-morons-face."
server)
(def-kom-var kom-default-face-scheme nil (def-kom-var kom-default-face-scheme nil
"*Face scheme to use per default for new logins.") "*Face scheme to use per default for new logins.")
...@@ -2043,7 +2052,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2043,7 +2052,7 @@ the value of kom-tell-phrases for fun.")
(def-kom-var lyskom-faces (def-kom-var lyskom-faces
'(kom-active-face kom-url-face kom-me-face kom-highlight-face '(kom-active-face kom-url-face kom-me-face kom-highlight-face
kom-text-face kom-subject-face kom-text-no-face kom-text-face kom-subject-face kom-text-no-face
kom-friends-face kom-presence-face kom-friends-face kom-morons-face kom-presence-face
kom-first-line-face kom-warning-face kom-mark-face) kom-first-line-face kom-warning-face kom-mark-face)
"This is a list of the faces that LysKOM uses.") "This is a list of the faces that LysKOM uses.")
...@@ -2057,6 +2066,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2057,6 +2066,7 @@ the value of kom-tell-phrases for fun.")
(kom-subject-face default nil nil) (kom-subject-face default nil nil)
(kom-text-no-face kom-active-face nil nil) (kom-text-no-face kom-active-face nil nil)
(kom-friends-face default "blue3" "lavender") (kom-friends-face default "blue3" "lavender")
(kom-morons-face default "blue3" "yellow")
(kom-presence-face italic "dim gray" nil) (kom-presence-face italic "dim gray" nil)
(kom-mark-face bold "blue3" "lavender") (kom-mark-face bold "blue3" "lavender")
(kom-warning-face bold "red" nil) (kom-warning-face bold "red" nil)
...@@ -2070,6 +2080,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2070,6 +2080,7 @@ the value of kom-tell-phrases for fun.")
(kom-subject-face default "Khaki" nil) (kom-subject-face default "Khaki" nil)
(kom-text-no-face kom-active-face nil nil) (kom-text-no-face kom-active-face nil nil)
(kom-friends-face default "red" nil) (kom-friends-face default "red" nil)
(kom-morons-face default "yellow" nil)
(kom-presence-face italic "grey" nil) (kom-presence-face italic "grey" nil)
(kom-mark-face default "gold" "black") (kom-mark-face default "gold" "black")
(kom-warning-face bold "red" nil) (kom-warning-face bold "red" nil)
...@@ -2083,6 +2094,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2083,6 +2094,7 @@ the value of kom-tell-phrases for fun.")
(kom-subject-face default nil nil) (kom-subject-face default nil nil)
(kom-text-no-face kom-active-face nil nil) (kom-text-no-face kom-active-face nil nil)
(kom-friends-face underline nil nil) (kom-friends-face underline nil nil)
(kom-morons-face strikethrough nil nil)
(kom-presence-face italic nil nil) (kom-presence-face italic nil nil)
(kom-mark-face bold nil "black") (kom-mark-face bold nil "black")
(kom-warning-face bold nil nil) (kom-warning-face bold nil nil)
...@@ -2096,6 +2108,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2096,6 +2108,7 @@ the value of kom-tell-phrases for fun.")
(kom-subject-face default nil nil) (kom-subject-face default nil nil)
(kom-text-no-face default nil nil) (kom-text-no-face default nil nil)
(kom-friends-face default nil "alice blue") (kom-friends-face default nil "alice blue")
(kom-morons-face default nil "red")
(kom-presence-face italic "dim gray" nil) (kom-presence-face italic "dim gray" nil)
(kom-mark-face default nil "black") (kom-mark-face default nil "black")
(kom-warning-face bold nil nil) (kom-warning-face bold nil nil)
...@@ -2108,6 +2121,7 @@ the value of kom-tell-phrases for fun.") ...@@ -2108,6 +2121,7 @@ the value of kom-tell-phrases for fun.")
(kom-text-face default nil nil) (kom-text-face default nil nil)
(kom-text-no-face default nil nil) (kom-text-no-face default nil nil)
(kom-friends-face default "darkblue" "thistle") (kom-friends-face default "darkblue" "thistle")
(kom-morons-face strikethrough "red" "seagreen")
(kom-subject-face default nil nil) (kom-subject-face default nil nil)
(kom-presence-face italic "dim gray" nil) (kom-presence-face italic "dim gray" nil)
(kom-mark-face bold "darkblue" "thistle") (kom-mark-face bold "darkblue" "thistle")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment