Commit b8fda8c5 authored by David Byers's avatar David Byers
Browse files

Nya hookar i lyskom-send-message, omstuvning av en keymap för dokumentationsverktygets skull

parent 4f7e89ce
Wed Aug 14 13:19:06 1996 David Byers <davby@sen2.ida.liu.se>
* vars.el.in (lyskom-send-message-setup-hook): Ny variabel.
(lyskom-send-message-exit-hook): Ny variabel.
* commands2.el (lyskom-send-message): Anropa
lyskom-send-message-setup-hook fre lsning av meddelande och
lyskom-send-message-exit-hook eftert.
(lyskom-send-message-auto-fill): Ny funktion.
(lyskom-send-message-resize-minibuffer): Ny funktion.
(lyskom-send-message-turn-off-resize-on-exit): Ny funktion.
Tue Aug 13 14:58:55 1996 David Byers <davby@sen2.ida.liu.se>
* vars.el.in (lyskom-after-load-hook): Bytte namn frn
kom-after-load-hook. Gjorde om till anvndarvariabel.
Sun Aug 11 12:32:14 1996 David Byers <davby@sen2.ida.liu.se>
* commands2.el (kom-set-garb-nice): Stt MUSTMATCH till t i anrop
......
......@@ -457,7 +457,17 @@ otherwise: the conference is read with lyskom-completing-read."
"Send a message to the person with the number PERS-NO. PERS-NO == 0
means send the message to everybody. MESSAGE is the message to
send. If DONTSHOW is non-nil, don't display the sent message."
(let* ((string (or message
(let* ((minibuffer-setup-hook minibuffer-setup-hook)
(minibuffer-exit-hook minibuffer-exit-hook)
(tmp (add-hook 'minibuffer-setup-hook
(function
(lambda () (run-hooks
'lyskom-send-message-setup-hook)))))
(tmp (add-hook 'minibuffer-exit-hook
(function
(lambda () (run-hooks
'lyskom-send-message-exit-hook)))))
(string (or message
(lyskom-read-string (lyskom-get-string 'message-prompt))))
(reply (blocking-do 'send-message pers-no string))
(to-conf-stat (if (zerop pers-no)
......@@ -478,6 +488,25 @@ send. If DONTSHOW is non-nil, don't display the sent message."
string)) ;+++ lyskom-errno
))
(defun lyskom-send-message-turn-off-resize-on-exit ()
(resize-minibuffer-mode -1)
(remove-hook 'lyskom-send-message-exit-hook
'lyskom-send-message-turn-off-resize-on-exit))
(defun lyskom-send-message-resize-minibuffer ()
"Temporarily turn on resizing of minibuffer"
(if (not resize-minibuffer-mode)
(progn
(resize-minibuffer-mode 0)
(add-hook 'lyskom-send-message-exit-hook
'lyskom-send-message-turn-off-resize-on-exit))))
(defun lyskom-send-message-auto-fill ()
"Temporarily turn on auto fill in minibuffer"
(setq fill-column 78)
(auto-fill-mode 1))
;;; ================================================================
......
......@@ -1169,25 +1169,13 @@ Cf. paragraph-start.")
(define-prefix-command 'lyskom-S-prefix)
(define-prefix-command 'lyskom-filter-get-prefix)
(define-key lyskom-mode-map "{" 'lyskom-change-prefix) ; krullar
(define-key lyskom-mode-map "[" 'lyskom-change-prefix)
(define-key lyskom-mode-map "}" 'lyskom-review-prefix)
(define-key lyskom-mode-map "]" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\344" 'lyskom-change-prefix) ; 8-bit keymap
;; (define-key lyskom-mode-map "\304" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\345" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\305" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\M-{" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\M-[" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\M-}" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\M-]" 'lyskom-review-prefix)
(define-key lyskom-mode-map "f" 'lyskom-filter-get-prefix)
(define-key lyskom-mode-map "n" 'lyskom-next-prefix)
(define-key lyskom-mode-map "l" 'lyskom-list-prefix)
(define-key lyskom-mode-map "s" 'lyskom-S-prefix)
;; emacs 19
(if (string-match "^19" emacs-version)
(progn
(define-key lyskom-mode-map [?\344] 'lyskom-change-prefix)
......@@ -1206,6 +1194,22 @@ Cf. paragraph-start.")
(define-key lyskom-mode-map "\C-i" 'kom-next-link)
(define-key lyskom-mode-map "\M-\C-i" 'kom-previous-link)
))
(define-key lyskom-mode-map "{" 'lyskom-change-prefix) ; krullar
(define-key lyskom-mode-map "[" 'lyskom-change-prefix)
(define-key lyskom-mode-map "}" 'lyskom-review-prefix)
(define-key lyskom-mode-map "]" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\344" 'lyskom-change-prefix) ; 8-bit keymap
;; (define-key lyskom-mode-map "\304" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\345" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\305" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\M-{" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\M-[" 'lyskom-change-prefix)
;; (define-key lyskom-mode-map "\M-}" 'lyskom-review-prefix)
;; (define-key lyskom-mode-map "\M-]" 'lyskom-review-prefix)
;;(define-key lyskom-mode-map "vi" 'vilka)
;; These should be first in order to be last in the menu of alternatives.
......
......@@ -194,13 +194,19 @@ tree.
This variable is stored in the LysKOM server.")
(defvar kom-after-load-hook nil
"Hook to run once after lyskom is loaded.
(defvar lyskom-send-message-setup-hook nil
"*Hook that is called when the minibuffer is entered to read a message.")
(defvar lyskom-send-message-exit-hook nil
"*Hook that is called when the minibuffer is exited after reading a message.")
(defvar lyskom-after-load-hook nil
"*Hook to run once after lyskom is loaded.
This variable is not saved in the LysKOM server.")
(defvar lyskom-login-hook nil
"What to do when logged in.
"*What to do when logged in.
This hook is called after we have logged in but before and command is
accepted from the keyboard. It is called immediately before
kom-login-hook.
......@@ -325,7 +331,7 @@ to call.
This variable is stored in the LysKOM server")
(defvar lyskom-ding-on-no-subject 2
"How to ding if the user has not entered a subject line.
"*How to ding if the user has not entered a subject line.
A number means the number of times to ding. A string is an argument for the
program named by kom-audio-player. A symbol is interpreted as a function
to call.
......@@ -351,7 +357,7 @@ This variable is stored in the LysKOM server.")
(defvar lyskom-filter-outgoing-messages t
"t if outgoing remote-control messages and automatic replies are not
"*t if outgoing remote-control messages and automatic replies are not
to be displayed in the buffer.
This variable is not saved in the LysKOM server.")
......@@ -540,7 +546,7 @@ This variable is not saved in the LysKOM server.")
("kom.csd.uu.se" . "CSD-KOM")
("striterax.medio.mh.se" . "MedioKOM")
("kom.mds.mdh.se" . "MdS-KOM"))
"An alist mapping server names to shorter identification strings
"*An alist mapping server names to shorter identification strings
This variable is not saved in the LysKOM server.")
......@@ -759,7 +765,7 @@ if any problems are detected.")
"Internal of kom-do-when-done.")
(defvar lyskom-do-when-starting nil
"Internal of kom-do-when-starting.")
"Internal of kom-do-when-starting. Obsolete")
(defvar lyskom-list-of-edit-buffers nil
"Keeps track of active edit-buffers.")
......@@ -1037,10 +1043,10 @@ This is used by the command kom-busy-wait.")
"The default file name when saving a lyskom-text.")
(defvar lyskom-mode-hook nil
"Hook to run when lyskom-mode is entered.")
"*Hook to run when lyskom-mode is entered.")
(defvar kom-quit-hook nil
"Hook to run when the LysKOM session is correctly ended.
"*Hook to run when the LysKOM session is correctly ended.
This variable is stored in the LysKOM server.")
......
Supports Markdown
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