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

Fixed bug 475 (manipulate and navigate active areas in the edit buffer

using the keyboard).
Fixed bug 483 (make the new add button optional)
parent 25a25a48
2002-04-26 David Byers <david.byers@swipnet.se>
* option-edit.el (lyskom-custom-variables): Added
kom-edit-hide-add-button.
(lyskom-customize-buffer-format): Added kom-edit-hide-add-button.
* vars.el.in (kom-edit-hide-add-button): New variable.
* edit-text.el (lyskom-edit-insert-aux-item): Number of lines to
back up depends on kom-edit-hide-add-button.
(lyskom-edit-insert-miscs): Insert add button only if
kom-edit-hide-add-button is nil.
Fix bug 475:
* edit-text.el (kom-ispell-message): Don't search for
ispell-message-start-skip unless it is a string.
New command.
(kom-edit-prev-button): New command.
(lyskom-edit-find-separator): New function. Extracted code that
finds the separator line.
(kom-ispell-message): Use it.
(lyskom-edit-insert-aux-item): Use it.
(lyskom-edit-replace-headers): Use it.
(lyskom-edit-parse-headers): Use it.
(lyskom-edit-extract-text): Use it.
(lyskom-edit-on-aux-item): Use it.
(lyskom-edit-fcc-text): Use it.
* english-strings.el, swedish-strings.el: Bind * and = in
lyskom-edit-mode-map to kom-button-click-or-self-insert and
kom-button-press-or-self-insert respectively. Bind TAB and M-TAB
to kom-edit-next-button-or-self-insert and kom-edit-prev-button
respectively.
* lyskom-buttons.el (kom-button-press-or-self-insert-command): New
function.
(kom-menu-button-press-or-self-insert-command): New function.
2002-04-25 David Byers <david.byers@swipnet.se> 2002-04-25 David Byers <david.byers@swipnet.se>
* view-text.el (lyskom-print-text): Use kom-highlight-text-body to * view-text.el (lyskom-print-text): Use kom-highlight-text-body to
......
...@@ -170,6 +170,22 @@ Does lyskom-end-of-command." ...@@ -170,6 +170,22 @@ Does lyskom-end-of-command."
) )
(defun lyskom-edit-find-separator (&optional move-point)
"Return the end position of the separator line.
If MOVE-POINT is non-nil, move point to the start of the separator."
(prog1
(save-excursion
(goto-char (point-min))
(and (re-search-forward
(concat "^"
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil t)))
(when (and move-point (match-beginning 0))
(goto-char (match-beginning 0)))))
(defun lyskom-edit-insert-miscs (misc-list subject body &optional aux-list) (defun lyskom-edit-insert-miscs (misc-list subject body &optional aux-list)
"Insert MISC-LIST into header of text. "Insert MISC-LIST into header of text.
...@@ -224,11 +240,12 @@ nil -> Ingenting." ...@@ -224,11 +240,12 @@ nil -> Ingenting."
(lyskom-get-string 'aux-item-prefix)) (lyskom-get-string 'aux-item-prefix))
where-put-misc))))) where-put-misc)))))
aux-list) aux-list)
(unless kom-edit-hide-add-button
(lyskom-princ (lyskom-format "%[%#1@%#2s%]\n" (lyskom-princ (lyskom-format "%[%#1@%#2s%]\n"
(lyskom-default-button 'add-recipient-or-xref (lyskom-default-button 'add-recipient-or-xref
edit-buffer) edit-buffer)
(lyskom-get-string 'add-recpt-button-text)) (lyskom-get-string 'add-recpt-button-text))
where-put-misc) where-put-misc))
(lyskom-princ (lyskom-format 'text-mass subject (lyskom-princ (lyskom-format 'text-mass subject
(substitute-command-keys (substitute-command-keys
(lyskom-get-string 'header-separator)) (lyskom-get-string 'header-separator))
...@@ -343,71 +360,6 @@ This one differs from lyskom-edit-mode-hook in that it is called before ...@@ -343,71 +360,6 @@ This one differs from lyskom-edit-mode-hook in that it is called before
the lyskom-special key bindings are added.") the lyskom-special key bindings are added.")
;;;(defun lyskom-edit-mode ()
;;; "\\<lyskom-edit-mode-map>Mode for editing texts for LysKOM.
;;;Commands:
;;;\\[kom-edit-send] sends the text when you are ready. The buffer will be
;;; deleted if (and only if) the server accepts the text.
;;;\\[kom-edit-quit] aborts the editing. You will get back to the LysKOM buffer.
;;;
;;;\\[kom-edit-show-commented] shows the commented text in a temporary buffer.
;;;
;;;\\[kom-edit-add-recipient] asks for another recipient and adds him to the header.
;;;\\[kom-edit-add-copy] as \\[kom-edit-add-recipient] but adds him as copy-recipient.
;;;
;;;\\[kom-edit-insert-commented] inserts the commented of footnoted text.
;;;\\[kom-edit-insert-text] inserts the shown text, you tell the number."
;;; (interactive)
;;; (let ((tmp-keymap nil))
;;; (kill-all-local-variables)
;;; (text-mode)
;;;
;;; (run-hooks 'lyskom-edit-mode-mode-hook)
;;;
;;; (setq tmp-keymap (and (current-local-map)
;;; (copy-keymap (current-local-map))))
;;;
;;; (lyskom-set-menus 'lyskom-edit-mode lyskom-edit-mode-map)
;;; (setq mode-line-buffer-identification '("LysKOM (server: %b)"))
;;; (setq major-mode 'lyskom-edit-mode)
;;; (setq mode-name lyskom-edit-mode-name)
;;;
;;; (if tmp-keymap
;;; (let ((new-keymap (make-sparse-keymap)))
;;; (make-local-variable 'lyskom-edit-mode-map)
;;; (setq lyskom-edit-mode-map
;;; (lyskom-default-value 'lyskom-edit-mode-map))
;;;
;;; (lyskom-xemacs-or-gnu
;;; (set-keymap-parents new-keymap
;;; (list lyskom-edit-mode-map
;;; tmp-keymap))
;;; (progn (set-keymap-parent new-keymap lyskom-edit-mode-map)
;;; (lyskom-overlay-keymap lyskom-edit-mode-map
;;; tmp-keymap
;;; new-keymap)))
;;; (use-local-map new-keymap))
;;;
;;; (lyskom-use-local-map lyskom-edit-mode-map))
;;;
;;;
;;; (auto-save-mode 1)
;;; (auto-fill-mode 1)
;;; (make-local-variable 'paragraph-start)
;;; (make-local-variable 'paragraph-separate)
;;; (setq paragraph-start (concat "^"
;;; (regexp-quote
;;; (substitute-command-keys
;;; (lyskom-get-string 'header-separator)))
;;; "$\\|" paragraph-start))
;;; (setq paragraph-separate (concat "^"
;;; (regexp-quote
;;; (substitute-command-keys
;;; (lyskom-get-string 'header-separator)))
;;; "$\\|" paragraph-separate))
;;; (run-hooks 'lyskom-edit-mode-hook)))
(defun lyskom-edit-mode (&optional arg) (defun lyskom-edit-mode (&optional arg)
"\\<lyskom-edit-mode-map>Mode for editing texts for LysKOM. "\\<lyskom-edit-mode-map>Mode for editing texts for LysKOM.
Commands: Commands:
...@@ -708,15 +660,7 @@ Based on ispell-message." ...@@ -708,15 +660,7 @@ Based on ispell-message."
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(let* ((internal-messagep (let* ((internal-messagep (lyskom-edit-find-separator t))
(save-excursion
(re-search-forward
(concat "^"
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil t)))
(limit (limit
(copy-marker (copy-marker
(cond ((not ispell-message-text-end) (point-max)) (cond ((not ispell-message-text-end) (point-max))
...@@ -760,6 +704,7 @@ Based on ispell-message." ...@@ -760,6 +704,7 @@ Based on ispell-message."
(match-beginning 0))) (match-beginning 0)))
(end-fwd (and (goto-char start) (end-fwd (and (goto-char start)
(boundp 'ispell-message-start-skip) (boundp 'ispell-message-start-skip)
(stringp ispell-message-start-skip)
(re-search-forward ispell-message-start-skip (re-search-forward ispell-message-start-skip
limit 'end))) limit 'end)))
(end (or (and end-c end-fwd (min end-c end-fwd)) (end (or (and end-c end-fwd (min end-c end-fwd))
...@@ -1420,16 +1365,8 @@ RECPT-TYPE is the type of recipient to add." ...@@ -1420,16 +1365,8 @@ RECPT-TYPE is the type of recipient to add."
(defun lyskom-edit-insert-aux-item (item) (defun lyskom-edit-insert-aux-item (item)
"Insert the aux item ITEM in the current buffer" "Insert the aux item ITEM in the current buffer"
(save-excursion (save-excursion
(goto-char (point-min)) (lyskom-edit-find-separator t)
(re-search-forward (forward-line (if kom-edit-hide-add-button -1 -2))
(concat "^"
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil t)
(beginning-of-line)
(forward-line -2)
(insert (insert
(concat (lyskom-format (concat (lyskom-format
(format "%%#1@%%[%s%%] %%#2s" (lyskom-get-string 'aux-item-prefix)) (format "%%#1@%%[%s%%] %%#2s" (lyskom-get-string 'aux-item-prefix))
...@@ -1550,11 +1487,7 @@ to lyskom-edit-replace-headers" ...@@ -1550,11 +1487,7 @@ to lyskom-edit-replace-headers"
(goto-char (point-min)) (goto-char (point-min))
(setq start (point-marker)) (setq start (point-marker))
(set-marker-insertion-type start t) (set-marker-insertion-type start t)
(re-search-forward (concat "^" (lyskom-edit-find-separator t)
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$"))
(end-of-line) (end-of-line)
(setq end (point-marker)) (setq end (point-marker))
(goto-char (point-min)) (goto-char (point-min))
...@@ -1595,12 +1528,7 @@ easy to use the result in a call to `lyskom-create-misc-list'." ...@@ -1595,12 +1528,7 @@ easy to use the result in a call to `lyskom-create-misc-list'."
(aux nil)) (aux nil))
(save-restriction (save-restriction
;; Narrow to headers ;; Narrow to headers
(re-search-forward (concat "^" (lyskom-edit-find-separator t)
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$"))
(beginning-of-line)
(narrow-to-region (point-min) (point)) (narrow-to-region (point-min) (point))
(goto-char (point-min)) (goto-char (point-min))
(while (< (point) (point-max)) (while (< (point) (point-max))
...@@ -1687,15 +1615,10 @@ Point must be located on the line where the subject is." ...@@ -1687,15 +1615,10 @@ Point must be located on the line where the subject is."
(defun lyskom-edit-extract-text () (defun lyskom-edit-extract-text ()
"Get text as a string." "Get text as a string."
(save-excursion (save-excursion
(goto-char (point-min)) (if (not (lyskom-edit-find-separator t))
(if (not (re-search-forward (concat "^"
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil (point-max)))
(signal 'lyskom-internal-error (signal 'lyskom-internal-error
"Altered lyskom-header-separator line.") "Altered lyskom-header-separator line.")
(end-of-line)
(buffer-substring (1+ (point)) (buffer-substring (1+ (point))
(progn (progn
(goto-char (1- (point-max))) (goto-char (1- (point-max)))
...@@ -1710,12 +1633,7 @@ Point must be located on the line where the subject is." ...@@ -1710,12 +1633,7 @@ Point must be located on the line where the subject is."
(save-excursion (save-excursion
(beginning-of-line) (beginning-of-line)
(and (lyskom-looking-at (lyskom-get-string 'aux-item-prefix-regexp)) (and (lyskom-looking-at (lyskom-get-string 'aux-item-prefix-regexp))
(re-search-forward (concat "^" (> (lyskom-edit-find-separator) (point)))))
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil (point-max)))))
(defun lyskom-create-text-handler (text-no edit-buffer (defun lyskom-create-text-handler (text-no edit-buffer
...@@ -1816,14 +1734,7 @@ Point must be located on the line where the subject is." ...@@ -1816,14 +1734,7 @@ Point must be located on the line where the subject is."
(erase-buffer) (erase-buffer)
(insert text) (insert text)
(goto-char (point-min)) (goto-char (point-min))
(when (re-search-forward (when (lyskom-edit-find-separator t)
(concat "^"
(regexp-quote
(substitute-command-keys
(lyskom-get-string 'header-separator)))
"$")
nil t)
(goto-char (match-beginning 0))
(delete-region (match-beginning 0) (match-end 0)) (delete-region (match-beginning 0) (match-end 0))
(insert (make-string kom-text-header-dash-length ?-)) (insert (make-string kom-text-header-dash-length ?-))
(forward-line 1) (forward-line 1)
...@@ -1977,61 +1888,42 @@ buglist style, automating the removal of closed subjects and change-marks." ...@@ -1977,61 +1888,42 @@ buglist style, automating the removal of closed subjects and change-marks."
;;; ================================================================ ;;; ================================================================
;;; Maphanteringsfunktion - keymap handling. ;;; Tab between buttons in the header
;;;
;;; Author: Linus Tolke (defun kom-edit-next-button-or-self-insert (num)
;;; (interactive "p")
(let ((header-end (lyskom-edit-find-separator))
(defun overlay-map (oldmap newmap) (start (point))
"Returns a map that is the union of OLDMAP and NEWMAP. NEW-MAP has priority. (next-pos nil))
This function chooses whether the returned map is a list or an array. (if (> (point) header-end)
Currently always same type as oldmap. (call-interactively 'self-insert-command)
BUG: does not descend in the maps." (while (> num 0)
(cond (lyskom-next-area 1 'lyskom-button)
((not (keymapp oldmap)) (if (eq start (point))
newmap) (setq next-pos nil)
((not (keymapp newmap)) (setq next-pos (point)))
oldmap) (cond ((or (null next-pos)
(t (> next-pos header-end))
(let ((map (copy-keymap oldmap)) (goto-char start)
(r 0)) (unless (re-search-forward (regexp-quote (lyskom-get-string
(cond 'header-subject))
((fboundp 'map-keymap) ;Special for lucid-emacs header-end
(map-keymap t)
(function (goto-char (point-max))
(lambda (event function) (setq num 0)))
(define-key map (vector event) function))) (t (goto-char next-pos)))
newmap)) (setq num (1- num) start (point))))))
((and (string-match "^19" emacs-version)
(arrayp (car (cdr newmap)))) (defun kom-edit-prev-button (num)
(while (< r (length (car (cdr newmap)))) (interactive "p")
(if (aref (car (cdr newmap)) r) (let ((header-end (lyskom-edit-find-separator)))
(define-key map (char-to-string r) (aref (car (cdr newmap)) r))) (while (> num 0)
(setq r (1+ r))) (cond ((and (> (point) header-end)
(mapcar (progn (goto-char (point-min))
(function (re-search-forward (regexp-quote (lyskom-get-string
(lambda (ele) 'header-subject))
(define-key map header-end
(cond t)))
((integerp (car ele)) (setq num (1- num)))
(char-to-string (car ele))) (t (lyskom-prev-area num 'lyskom-button)
((vector (car ele)))) (setq num 0))))))
(cdr ele))))
(cdr (cdr newmap))))
((arrayp newmap)
(while (< r (length newmap))
(if (aref newmap r)
(define-key map (char-to-string r) (aref newmap r)))
(setq r (1+ r))))
(t
(mapcar
(function
(lambda (ele)
(define-key map
(cond
((integerp (car ele))
(char-to-string (car ele)))
((vector (car ele))))
(cdr ele))))
(cdr newmap))))
map))))
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
;;;; ;;;;
;;;; This file contains all strings in the LysKOM elisp client. ;;;; This file contains all strings in the LysKOM elisp client.
;;;; Language: English. ;;;; Language: English.
;;;; Matches version 36.11 of swedish-strings.el
;;;; ================================================================ ;;;; ================================================================
;;;; ;;;;
;;;; Translation from swedish-strings.el: David Byers ;;;; Translation from swedish-strings.el: David Byers
...@@ -75,6 +74,10 @@ ...@@ -75,6 +74,10 @@
(define-key lyskom-en-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2up 'button2))) 'kom-mouse-null) (define-key lyskom-en-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2up 'button2))) 'kom-mouse-null)
(define-key lyskom-en-edit-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu) (define-key lyskom-en-edit-mode-map (kbd (lyskom-keys 'button3)) 'kom-popup-menu)
(define-key lyskom-en-edit-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null) (define-key lyskom-en-edit-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null)
(define-key lyskom-en-edit-mode-map (kbd "*") 'kom-button-press-or-self-insert-command)
(define-key lyskom-en-edit-mode-map (kbd "=") 'kom-menu-button-press-or-self-insert-command)
(define-key lyskom-en-edit-mode-map (kbd "TAB") 'kom-edit-next-button-or-self-insert)
(define-key lyskom-en-edit-mode-map (kbd "M-TAB") 'kom-edit-prev-button)
(define-key lyskom-en-edit-mode-map (kbd "C-c") 'lyskom-en-edit-prefix) (define-key lyskom-en-edit-mode-map (kbd "C-c") 'lyskom-en-edit-prefix)
(define-key lyskom-en-edit-prefix (kbd "C-x") 'lyskom-en-edit-aux-prefix) (define-key lyskom-en-edit-prefix (kbd "C-x") 'lyskom-en-edit-aux-prefix)
(define-key lyskom-en-edit-prefix (kbd "?") 'lyskom-help) (define-key lyskom-en-edit-prefix (kbd "?") 'lyskom-help)
...@@ -82,7 +85,7 @@ ...@@ -82,7 +85,7 @@
(define-key lyskom-en-edit-prefix (kbd "C-i") 'lyskom-en-edit-insert-prefix) (define-key lyskom-en-edit-prefix (kbd "C-i") 'lyskom-en-edit-insert-prefix)
(define-key lyskom-en-edit-prefix (kbd "TAB") 'lyskom-en-edit-insert-prefix) (define-key lyskom-en-edit-prefix (kbd "TAB") 'lyskom-en-edit-insert-prefix)
(define-key lyskom-en-edit-prefix (kbd "*") 'kom-button-press) (define-key lyskom-en-edit-prefix (kbd "*") 'kom-button-press)
(define-key lyskom-en-edit-prefix (kbd "+") 'kom-menu-button-press) (define-key lyskom-en-edit-prefix (kbd "=") 'kom-menu-button-press)
(define-key lyskom-en-edit-prefix (kbd "C-c") 'kom-edit-send) (define-key lyskom-en-edit-prefix (kbd "C-c") 'kom-edit-send)
(define-key lyskom-en-edit-prefix (kbd "C-s") 'kom-ispell-message) (define-key lyskom-en-edit-prefix (kbd "C-s") 'kom-ispell-message)
(define-key lyskom-en-edit-prefix (kbd "C-k") 'kom-edit-quit) (define-key lyskom-en-edit-prefix (kbd "C-k") 'kom-edit-quit)
...@@ -2124,7 +2127,7 @@ Number of sessions: %21#1d (total) ...@@ -2124,7 +2127,7 @@ Number of sessions: %21#1d (total)
(define-key lyskom-en-mode-map (kbd (lyskom-keys 'button2up)) 'kom-mouse-null) (define-key lyskom-en-mode-map (kbd (lyskom-keys 'button2up)) 'kom-mouse-null)
(define-key lyskom-en-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null) (define-key lyskom-en-mode-map (kbd (lyskom-keys 'button3up)) 'kom-mouse-null)
(define-key lyskom-en-mode-map (kbd "*") 'kom-button-press) (define-key lyskom-en-mode-map (kbd "*") 'kom-button-press)
(define-key lyskom-en-mode-map (kbd "+") 'kom-menu-button-press) (define-key lyskom-en-mode-map (kbd "=") 'kom-menu-button-press)
(define-key lyskom-en-mode-map (kbd "TAB") 'kom-next-link) (define-key lyskom-en-mode-map (kbd "TAB") 'kom-next-link)
(define-key lyskom-en-mode-map (kbd "M-TAB") 'kom-previous-link) (define-key lyskom-en-mode-map (kbd "M-TAB") 'kom-previous-link)
...@@ -3458,6 +3461,9 @@ be saved in the server. Otherwise it will be saved in your .emacs.") ...@@ -3458,6 +3461,9 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-highlight-text-body-doc . "\ (kom-highlight-text-body-doc . "\
When this is on, the text body is shown with a different format than When this is on, the text body is shown with a different format than
normal text.") normal text.")
(kom-edit-hide-add-button-doc . "\
When this is on, an [Add...] button will be shown after the list of
recipients and auxiliary information when writing a new text.")
;; ;;
...@@ -3630,6 +3636,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.") ...@@ -3630,6 +3636,7 @@ be saved in the server. Otherwise it will be saved in your .emacs.")
(kom-highlight-first-line-tag . "Color fist line:") (kom-highlight-first-line-tag . "Color fist line:")
(kom-highlight-dashed-lines-tag . "Color dashed lines:") (kom-highlight-dashed-lines-tag . "Color dashed lines:")
(kom-highlight-text-body-tag . "Color text backgrounds:") (kom-highlight-text-body-tag . "Color text backgrounds:")
(kom-edit-hide-add-button-tag . "Show add button when writing texts:")
) )
) )
......
...@@ -90,11 +90,26 @@ on such functions see the documentation for lyskom-add-button-action." ...@@ -90,11 +90,26 @@ on such functions see the documentation for lyskom-add-button-action."
(lyskom-next-area num 'lyskom-button)) (lyskom-next-area num 'lyskom-button))
(defun kom-button-press-or-self-insert-command ()
"Simulate a mouse button press at point, if there is a button."
(interactive)
(if (get-text-property (point) 'lyskom-button)
(call-interactively 'kom-button-press)
(call-interactively 'self-insert-command)))
(defun kom-button-press () (defun kom-button-press ()
"Simulate a mouse button press at point." "Simulate a mouse button press at point."
(interactive) (interactive)
(lyskom-button-press (point))) (lyskom-button-press (point)))
(defun kom-menu-button-press-or-self-insert-command ()
"Simulate a menu mouse button press at point, if there is a button."
(interactive)
(if (get-text-property (point) 'lyskom-button)
(call-interactively 'kom-menu-button-press)
(call-interactively 'self-insert-command)))
(defun kom-menu-button-press () (defun kom-menu-button-press ()
"Simulate a menu mouse button press at point." "Simulate a menu mouse button press at point."
(interactive) (interactive)
......
...@@ -204,6 +204,7 @@ ...@@ -204,6 +204,7 @@
(writing bold centered) (writing bold centered)
section section
"\n" "\n"
[kom-edit-hide-add-button]
[kom-cite-string] [kom-cite-string]
[kom-ispell-dictionary] [kom-ispell-dictionary]
"\n" "\n"
...@@ -705,6 +706,7 @@ customize buffer but do not save them to the server." ...@@ -705,6 +706,7 @@ customize buffer but do not save them to the server."
(kom-print-relative-dates (toggle (yes no))) (kom-print-relative-dates (toggle (yes no)))
(kom-print-seconds-in-time-strings (toggle (yes no))) (kom-print-seconds-in-time-strings (toggle (yes no)))
(kom-extended-status-information (toggle (yes no))) (kom-extended-status-information (toggle (yes no)))
(kom-edit-hide-add-button (noggle (yes no)))
)) ))
(defvar lyskom-widget-functions (defvar lyskom-widget-functions
......
...@@ -69,6 +69,10 @@ ...@@ -69,6 +69,10 @@
(define-prefix-command 'lyskom-sv-edit-insert-prefix) (define-prefix-command 'lyskom-sv-edit-insert-prefix)
(define-prefix-command 'lyskom-sv-edit-aux-prefix) (define-prefix-command 'lyskom-sv-edit-aux-prefix)
(define-prefix-command 'lyskom-sv-edit-add-prefix) (define-prefix-command 'lyskom-sv-edit-add-prefix)
(define-key lyskom-sv-edit-mode-map (kbd "*") 'kom-button-press-or-self-insert-command)
(define-key lyskom-sv-edit-mode-map (kbd "=") 'kom-menu-button-press-or-self-insert-command)
(define-key lyskom-sv-edit-mode-map (kbd "TAB") 'kom-edit-next-button-or-self-insert)
(define-key lyskom-sv-edit-mode-map (kbd "M-TAB") 'kom-edit-prev-button)
(define-key lyskom-sv-edit-mode-map (kbd "C-c") 'lyskom-sv-edit-prefix) (define-key lyskom-sv-edit-mode-map (kbd "C-c") 'lyskom-sv-edit-prefix)
(define-key lyskom-sv-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2 'button2up))) 'kom-button-click-or-yank) (define-key lyskom-sv-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2 'button2up))) 'kom-button-click-or-yank)
(define-key lyskom-sv-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2up 'button2))) 'kom-mouse-null) (define-key lyskom-sv-edit-mode-map (kbd (lyskom-keys (lyskom-xemacs-or-gnu 'button2up 'button2))) 'kom-mouse-null)
...@@ -3914,6 +3918,9 @@ i servern. Annars sparas det i din .emacs.") ...@@ -3914,6 +3918,9 @@ i servern. Annars sparas det i din .emacs.")
(kom-highlight-text-body-doc . "\ (kom-highlight-text-body-doc . "\
Om detta r pslaget s visas inlggstexter med ett annorlunda utseende Om detta r pslaget s visas inlggstexter med ett annorlunda utseende
n normal text.") n normal text.")
(kom-edit-hide-add-button-doc . "\
Om detta r pslaget s kommer knappen [Addera...] att visas efter
mottagare och tillggsinformation nr man skriver inlgg.")
;; ;;
...@@ -4086,6 +4093,7 @@ i servern. Annars sparas det i din .emacs.") ...@@ -4086,6 +4093,7 @@ i servern. Annars sparas det i din .emacs.")
(kom-highlight-first-line-tag . "Annorlunda bakgrundsfrg p frsta raden:") (kom-highlight-first-line-tag . "Annorlunda bakgrundsfrg p frsta raden:")
(kom-highlight-dashed-lines-tag . "Annorlunda bakgrundsfrg fre och efter inlggstexten:") (kom-highlight-dashed-lines-tag . "Annorlunda bakgrundsfrg fre och efter inlggstexten:")
(kom-highlight-text-body-tag . "Annorlunda bakgrundsfrg p inlggstexten:") (kom-highlight-text-body-tag . "Annorlunda bakgrundsfrg p inlggstexten:")
(kom-edit-hide-add-button-tag . "Visa Addera-knappen nr man skriver inlgg:")
) )
) )
......
...@@ -101,6 +101,12 @@ are in the list.") ...@@ -101,6 +101,12 @@ are in the list.")
;;; User flags ;;; User flags
(def-kom-var kom-edit-hide-add-button nil
"*If non-nil, hide the add button shown after the headers when editing
a text."
server
)
(def-kom-var kom-highlight-text-body t (def-kom-var kom-highlight-text-body t
"*If t, use an alternate background color for texts in LysKOM. "*If t, use an alternate background color for texts in LysKOM.
If nil, do not use an alternate background. Other values are reserved If nil, do not use an alternate background. Other values are reserved
......