Commit 45aa9990 authored by David Byers's avatar David Byers
Browse files

Fix bug 673

parent 8e76519f
2007-06-24 <David Byers@GULAG> 2007-06-24 <David Byers@GULAG>
Fix bug 673:
* async.el (lyskom-show-personal-message): Don't run
lyskom-personal-message-hook.
(lyskom-default-new-recipient-hook): Don't run
lyskom-new-recipient-hook.
(lyskom-default-new-text-hook): Don't run lyskom-new-text-hook.
(lyskom-default-deleted-text-hook): Don't run
lyskom-deleted-text-hook.
* edit-text.el (lyskom-edit-send): Don't run lyskom-send-text-hook.
(lyskom-edit-send): Don't run lyskom-create-text-hook.
* lyskom-rest.el (lyskom-enter-conf): Don't run
lyskom-change-conf-hook or lyskom-after-change-conf-hook.
(lyskom-leave-current-conf): Run kom-change-conf-hook and
kom-after-change-conf-hook instead of the obsolete names.
* commands1.el (lyskom-go-to-empty-conf): Don't run
lyskom-change-conf-hook or lyskom-after-change-conf-hook.
* commands2.el (lyskom-send-message-minibuffer-setup-hook): Don't
run lyskom-send-message-setup-hook.
(lyskom-send-message-minibuffer-exit-hook): Don't run
lyskom-send-message-exit-hook.
* view-text.el (lyskom-view-text): Don't run
lyskom-view-text-hook.
* vars.el.in (lyskom-view-text-hook): Removed.
(lyskom-send-message-hook): Removed.
(lyskom-send-message-setup-hook): Removed.
(lyskom-send-message-exit-hook): Removed.
(lyskom-change-conf-hook): Removed.
(lyskom-after-change-conf-hook): Removed.
(lyskom-create-text-hook): Removed.
(lyskom-deleted-text-hook): Removed.
(lyskom-new-recipient-hook): Removed.
(lyskom-personal-message-hook): Removed.
Prepare to print more info on logins: Prepare to print more info on logins:
* async.el (lyskom-parse-async): Parse the session number in the * async.el (lyskom-parse-async): Parse the session number in the
login message. Get static session info. login message. Get static session info.
......
...@@ -500,7 +500,6 @@ Args: SENDER: conf-stat for the person sending the message. ...@@ -500,7 +500,6 @@ Args: SENDER: conf-stat for the person sending the message.
(not (eq (conf-stat->conf-no recipient) lyskom-pers-no))) (not (eq (conf-stat->conf-no recipient) lyskom-pers-no)))
(conf-stat->conf-no recipient) (conf-stat->conf-no recipient)
nil)) nil))
(run-hooks 'lyskom-personal-message-hook)
(run-hooks 'kom-personal-message-hook)) (run-hooks 'kom-personal-message-hook))
...@@ -689,7 +688,6 @@ converted, before insertion." ...@@ -689,7 +688,6 @@ converted, before insertion."
(when (and (not lyskom-dont-change-prompt) ;We shall change it (when (and (not lyskom-dont-change-prompt) ;We shall change it
(not lyskom-executing-command)) ;We have time to do it. (not lyskom-executing-command)) ;We have time to do it.
(lyskom-update-prompt)) (lyskom-update-prompt))
(run-hooks 'lyskom-new-recipient-hook)
(run-hooks 'kom-new-recipient-hook)) (run-hooks 'kom-new-recipient-hook))
...@@ -705,7 +703,6 @@ converted, before insertion." ...@@ -705,7 +703,6 @@ converted, before insertion."
(lyskom-update-prompt)) (lyskom-update-prompt))
(let ((no-message nil)) (let ((no-message nil))
(run-hooks 'lyskom-new-text-hook)
(run-hooks 'kom-new-text-hook) (run-hooks 'kom-new-text-hook)
(if (and (not no-message) (if (and (not no-message)
...@@ -719,7 +716,6 @@ converted, before insertion." ...@@ -719,7 +716,6 @@ converted, before insertion."
(if (and (not lyskom-dont-change-prompt) ;We shall change it (if (and (not lyskom-dont-change-prompt) ;We shall change it
(not lyskom-executing-command)) ;We have time to do it. (not lyskom-executing-command)) ;We have time to do it.
(lyskom-update-prompt)) (lyskom-update-prompt))
(run-hooks 'lyskom-deleted-text-hook)
(run-hooks 'kom-deleted-text-hook)) (run-hooks 'kom-deleted-text-hook))
(defun lyskom-async-new-text (text-stat) (defun lyskom-async-new-text (text-stat)
......
...@@ -1723,9 +1723,6 @@ Args: CONF-STAT MEMBERSHIP" ...@@ -1723,9 +1723,6 @@ Args: CONF-STAT MEMBERSHIP"
(let ((old-current-conf lyskom-current-conf)) (let ((old-current-conf lyskom-current-conf))
(unless lyskom-is-anonymous (unless lyskom-is-anonymous
(blocking-do 'pepsi (conf-stat->conf-no conf-stat))) (blocking-do 'pepsi (conf-stat->conf-no conf-stat)))
(lyskom-run-hook-with-args 'lyskom-change-conf-hook
lyskom-current-conf
(conf-stat->conf-no conf-stat))
(lyskom-run-hook-with-args 'kom-change-conf-hook (lyskom-run-hook-with-args 'kom-change-conf-hook
lyskom-current-conf lyskom-current-conf
(conf-stat->conf-no conf-stat)) (conf-stat->conf-no conf-stat))
...@@ -1733,9 +1730,6 @@ Args: CONF-STAT MEMBERSHIP" ...@@ -1733,9 +1730,6 @@ Args: CONF-STAT MEMBERSHIP"
(lyskom-enter-conf-print-unread conf-stat 0) (lyskom-enter-conf-print-unread conf-stat 0)
(lp--update-buffer old-current-conf) (lp--update-buffer old-current-conf)
(lp--update-buffer lyskom-current-conf) (lp--update-buffer lyskom-current-conf)
(lyskom-run-hook-with-args 'lyskom-after-change-conf-hook
lyskom-current-conf
(conf-stat->conf-no conf-stat))
(lyskom-run-hook-with-args 'kom-after-change-conf-hook (lyskom-run-hook-with-args 'kom-after-change-conf-hook
lyskom-current-conf lyskom-current-conf
(conf-stat->conf-no conf-stat)))) (conf-stat->conf-no conf-stat))))
......
...@@ -599,7 +599,6 @@ Runs `kom-send-message-setup-hook' when entering the minibuffer." ...@@ -599,7 +599,6 @@ Runs `kom-send-message-setup-hook' when entering the minibuffer."
(defun lyskom-send-message-minibuffer-setup-hook () (defun lyskom-send-message-minibuffer-setup-hook ()
(unwind-protect (unwind-protect
(progn (progn
(run-hooks 'lyskom-send-message-setup-hook)
(run-hooks 'kom-send-message-setup-hook)) (run-hooks 'kom-send-message-setup-hook))
(remove-hook 'minibuffer-setup-hook (remove-hook 'minibuffer-setup-hook
'lyskom-send-message-minibuffer-setup-hook))) 'lyskom-send-message-minibuffer-setup-hook)))
...@@ -607,7 +606,6 @@ Runs `kom-send-message-setup-hook' when entering the minibuffer." ...@@ -607,7 +606,6 @@ Runs `kom-send-message-setup-hook' when entering the minibuffer."
(defun lyskom-send-message-minibuffer-exit-hook () (defun lyskom-send-message-minibuffer-exit-hook ()
(unwind-protect (unwind-protect
(progn (progn
(run-hooks 'lyskom-send-message-exit-hook)
(run-hooks 'kom-send-message-exit-hook)) (run-hooks 'kom-send-message-exit-hook))
(remove-hook 'minibuffer-exit-hook (remove-hook 'minibuffer-exit-hook
'lyskom-send-message-minibuffer-exit-hook))) 'lyskom-send-message-minibuffer-exit-hook)))
...@@ -636,7 +634,6 @@ send. If DONTSHOW is non-nil, don't display the sent message." ...@@ -636,7 +634,6 @@ send. If DONTSHOW is non-nil, don't display the sent message."
(blocking-do 'get-conf-stat (blocking-do 'get-conf-stat
pers-no))) pers-no)))
(run-hooks 'lyskom-send-message-hook)
(run-hooks 'kom-send-message-hook) (run-hooks 'kom-send-message-hook)
(if lyskom-message-string (if lyskom-message-string
(progn (progn
......
...@@ -487,8 +487,7 @@ This runs `kom-send-text-hook' and (for backwards compatibility) ...@@ -487,8 +487,7 @@ This runs `kom-send-text-hook' and (for backwards compatibility)
;; Run user hooks ;; Run user hooks
;; ####: ++++: FIXME: We should quit more graciously. ;; ####: ++++: FIXME: We should quit more graciously.
(if (and (not (run-hook-with-args-until-failure 'kom-send-text-hook)) (if (not (run-hook-with-args-until-failure 'kom-send-text-hook))
(not (run-hook-with-args-until-failure 'lyskom-send-text-hook)))
(signal 'lyskom-edit-text-abort nil)) (signal 'lyskom-edit-text-abort nil))
...@@ -605,20 +604,6 @@ This runs `kom-send-text-hook' and (for backwards compatibility) ...@@ -605,20 +604,6 @@ This runs `kom-send-text-hook' and (for backwards compatibility)
(setq lyskom-dont-change-prompt t)) (setq lyskom-dont-change-prompt t))
(setq lyskom-is-writing nil) (setq lyskom-is-writing nil)
(lyskom-tell-internat 'kom-tell-send) (lyskom-tell-internat 'kom-tell-send)
(run-hook-with-args 'lyskom-create-text-hook
full-message
misc-list
(if (not is-anonymous)
(cons (lyskom-create-aux-item
0 15 0 0
(lyskom-create-aux-item-flags
nil nil nil nil nil nil nil nil)
0 (concat "lyskom.el "
lyskom-clientversion))
aux-list)
aux-list)
buffer
is-anonymous)
(run-hook-with-args 'kom-create-text-hook (run-hook-with-args 'kom-create-text-hook
full-message full-message
misc-list misc-list
......
...@@ -1044,9 +1044,6 @@ according to the value of kom-print-number-of-unread-on-entrance. ...@@ -1044,9 +1044,6 @@ according to the value of kom-print-number-of-unread-on-entrance.
Args: CONF-STAT READ-INFO" Args: CONF-STAT READ-INFO"
(let ((from-conf lyskom-current-conf) (let ((from-conf lyskom-current-conf)
(to-conf (conf-stat->conf-no conf-stat))) (to-conf (conf-stat->conf-no conf-stat)))
(lyskom-run-hook-with-args 'lyskom-change-conf-hook
from-conf
to-conf)
(lyskom-run-hook-with-args 'kom-change-conf-hook (lyskom-run-hook-with-args 'kom-change-conf-hook
lyskom-current-conf lyskom-current-conf
(conf-stat->conf-no conf-stat)) (conf-stat->conf-no conf-stat))
...@@ -1056,9 +1053,6 @@ Args: CONF-STAT READ-INFO" ...@@ -1056,9 +1053,6 @@ Args: CONF-STAT READ-INFO"
(lp--update-buffer to-conf) (lp--update-buffer to-conf)
(let ((num-unread (text-list->length (read-info->text-list read-info)))) (let ((num-unread (text-list->length (read-info->text-list read-info))))
(lyskom-enter-conf-print-unread conf-stat num-unread) (lyskom-enter-conf-print-unread conf-stat num-unread)
(lyskom-run-hook-with-args 'lyskom-after-change-conf-hook
from-conf
to-conf)
(lyskom-run-hook-with-args 'kom-after-change-conf-hook (lyskom-run-hook-with-args 'kom-after-change-conf-hook
lyskom-current-conf lyskom-current-conf
(conf-stat->conf-no conf-stat))))) (conf-stat->conf-no conf-stat)))))
...@@ -1090,11 +1084,11 @@ CONF is the conference and NUM is the number of unread in the conference." ...@@ -1090,11 +1084,11 @@ CONF is the conference and NUM is the number of unread in the conference."
"Leave the current conference without going to another one." "Leave the current conference without going to another one."
(let ((from-conf lyskom-current-conf)) (let ((from-conf lyskom-current-conf))
(set-read-list-empty lyskom-reading-list) (set-read-list-empty lyskom-reading-list)
(lyskom-run-hook-with-args 'lyskom-change-conf-hook (lyskom-run-hook-with-args 'kom-change-conf-hook
from-conf 0) from-conf 0)
(setq lyskom-current-conf 0) (setq lyskom-current-conf 0)
(initiate-pepsi 'main nil 0) (initiate-pepsi 'main nil 0)
(lyskom-run-hook-with-args 'lyskom-after-change-conf-hook (lyskom-run-hook-with-args 'kom-after-change-conf-hook
from-conf 0) from-conf 0)
)) ))
......
...@@ -1774,15 +1774,6 @@ mass of the text and `kom-view-text-text-stat' to the text-stat of the ...@@ -1774,15 +1774,6 @@ mass of the text and `kom-view-text-text-stat' to the text-stat of the
text to be shown." text to be shown."
local-hook) local-hook)
(def-kom-var lyskom-view-text-hook nil
"Obsolete synonym for kom-view-text-hook."
local-hook)
(def-kom-var lyskom-send-message-hook nil
"Obsolete synonym for lyskom-send-message-hook."
local-hook)
(def-kom-var kom-send-message-hook '(lyskom-send-message-trim-newlines) (def-kom-var kom-send-message-hook '(lyskom-send-message-trim-newlines)
"**Hook that is called before a personal, group or common message is sent. "**Hook that is called before a personal, group or common message is sent.
...@@ -1803,10 +1794,6 @@ writing messages. For example, the hook might enable `auto-fill-mode' ...@@ -1803,10 +1794,6 @@ writing messages. For example, the hook might enable `auto-fill-mode'
or set up automatic resizing of the minibuffer." or set up automatic resizing of the minibuffer."
local-hook) local-hook)
(def-kom-var lyskom-send-message-setup-hook nil
"Obsolete synonym for kom-send-message-setup-hook."
local-hook)
(def-kom-var kom-send-message-exit-hook nil (def-kom-var kom-send-message-exit-hook nil
"**Hook that is called when the minibuffer is exited after reading a message. "**Hook that is called when the minibuffer is exited after reading a message.
...@@ -1814,10 +1801,6 @@ Typically this hook will be used to undo the effects of ...@@ -1814,10 +1801,6 @@ Typically this hook will be used to undo the effects of
`kom-send-message-setup-hook'." `kom-send-message-setup-hook'."
local-hook) local-hook)
(def-kom-var lyskom-send-message-exit-hook nil
"Obsolete synonym for kom-send-message-exit-hook."
local-hook)
(def-kom-var kom-send-text-hook nil (def-kom-var kom-send-text-hook nil
"**Hook that is called before sending a text. "**Hook that is called before sending a text.
...@@ -1826,10 +1809,6 @@ for the headers to be modified after this hook is called. It is also ...@@ -1826,10 +1809,6 @@ for the headers to be modified after this hook is called. It is also
possible that the text will not be sent at all." possible that the text will not be sent at all."
local-hook) local-hook)
(def-kom-var lyskom-send-text-hook nil
"Obsolete synonym for kom-send-text-hook."
local-hook)
(def-kom-var kom-after-load-hook nil (def-kom-var kom-after-load-hook nil
"**Hook to run once after LysKOM is loaded. "**Hook to run once after LysKOM is loaded.
...@@ -1850,10 +1829,6 @@ This hook is run before `lyskom-current-conf' is changed, and before ...@@ -1850,10 +1829,6 @@ This hook is run before `lyskom-current-conf' is changed, and before
any standard messages have been printed." any standard messages have been printed."
local-hook) local-hook)
(def-kom-var lyskom-change-conf-hook nil
"Obsolete synonym for kom-change-conf-hook"
local-hook)
(def-kom-var kom-after-change-conf-hook nil (def-kom-var kom-after-change-conf-hook nil
"**Hook to run when changing conferences. "**Hook to run when changing conferences.
...@@ -1865,10 +1840,6 @@ This hook is run after `lyskom-current-conf' is changed, and after any ...@@ -1865,10 +1840,6 @@ This hook is run after `lyskom-current-conf' is changed, and after any
standard messages have been printed." standard messages have been printed."
local-hook) local-hook)
(def-kom-var lyskom-after-change-conf-hook nil
"Obsolete synonym for kom-after-change-conf-hook."
local-hook)
(def-kom-var lyskom-login-hook nil (def-kom-var lyskom-login-hook nil
"**Hook called while logging in. "**Hook called while logging in.
...@@ -4358,11 +4329,6 @@ aux-item list by modifying `aux-list'. This is not encouraged and may ...@@ -4358,11 +4329,6 @@ aux-item list by modifying `aux-list'. This is not encouraged and may
break in the future." break in the future."
local-hook) local-hook)
(def-kom-var lyskom-create-text-hook nil
"Obsolete synonym for kom-create-text-hook"
local-hook)
(def-kom-var kom-new-text-hook nil (def-kom-var kom-new-text-hook nil
"**Hook to run when a new text is created. "**Hook to run when a new text is created.
...@@ -4371,10 +4337,6 @@ but before the text \"Text 4711 created\" is printed in the message ...@@ -4371,10 +4337,6 @@ but before the text \"Text 4711 created\" is printed in the message
area and before the new prompt is printed." area and before the new prompt is printed."
local-hook) local-hook)
(def-kom-var lyskom-new-text-hook nil
"Obsolete synonym for kom-new-text-hook"
local-hook)
(def-kom-var kom-deleted-text-hook nil (def-kom-var kom-deleted-text-hook nil
"**Hook to run when a text is deleted. "**Hook to run when a text is deleted.
...@@ -4382,10 +4344,6 @@ This hook is run after the prompt is removed if it shall be changed but ...@@ -4382,10 +4344,6 @@ This hook is run after the prompt is removed if it shall be changed but
before the new prompt is printed." before the new prompt is printed."
local-hook) local-hook)
(def-kom-var lyskom-deleted-text-hook nil
"Obsolete synonym for kom-deleted-text-hook."
local-hook)
(def-kom-var kom-new-recipient-hook nil (def-kom-var kom-new-recipient-hook nil
"**Hook to run when a text receives a new recipient. "**Hook to run when a text receives a new recipient.
...@@ -4395,10 +4353,6 @@ been marked as read in any conference other than the person's ...@@ -4395,10 +4353,6 @@ been marked as read in any conference other than the person's
letterbox." letterbox."
local-hook) local-hook)
(def-kom-var lyskom-new-recipient-hook nil
"Obsolete synonym for kom-new-recipient-hook."
local-hook)
(def-kom-var kom-personal-message-hook nil (def-kom-var kom-personal-message-hook nil
"**Hook to run when a personal message is received. "**Hook to run when a personal message is received.
...@@ -4408,11 +4362,6 @@ an alarm message and otherwise the conf-stat of the recipient, and ...@@ -4408,11 +4362,6 @@ an alarm message and otherwise the conf-stat of the recipient, and
`message' is a string that holds the message." `message' is a string that holds the message."
local-hook) local-hook)
(def-kom-var lyskom-personal-message-hook nil
"Obsolete synonym for kom-personal-message-hook."
local-hook)
(def-kom-var lyskom-executing-command t (def-kom-var lyskom-executing-command t
"Non-nil means the client is executing a command. "Non-nil means the client is executing a command.
Most commands can't be interrupted by another command." Most commands can't be interrupted by another command."
......
...@@ -98,7 +98,6 @@ Note that this function must not be called asynchronously." ...@@ -98,7 +98,6 @@ Note that this function must not be called asynchronously."
lyskom-view-text-text-stat text-stat) lyskom-view-text-text-stat text-stat)
(if (and text-stat text) (if (and text-stat text)
(progn (progn
(run-hooks 'lyskom-view-text-hook)
(run-hooks 'kom-view-text-hook) (run-hooks 'kom-view-text-hook)
;; Use a marker, because the buffer may lose data ;; Use a marker, because the buffer may lose data
;; at the top if kom-max-buffer-size is set. ;; at the top if kom-max-buffer-size is set.
......
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