Commit 6f8b894d authored by David Byers's avatar David Byers
Browse files

Bug fixes

parent f56fa8c8
1999-01-09 David Byers <davby@ida.liu.se>
* commands2.el (kom-where-is): Nytt kommando.
1999-01-04 David Byers <davby@ida.liu.se>
* edit-text.el (lyskom-edit-extract-text): Gr inte
re-search-forward fr att hitta separatorn. Det r fel om man har
regexp-magiska tecken i strngen.
1999-01-01 Per Cederqvist <ceder@lysator.liu.se> 1999-01-01 Per Cederqvist <ceder@lysator.liu.se>
* parse.el (lyskom-skip-array): Glm inte att skippa det * parse.el (lyskom-skip-array): Glm inte att skippa det
......
...@@ -1726,6 +1726,32 @@ is alive." ...@@ -1726,6 +1726,32 @@ is alive."
(error (lyskom-get-string 'no-unread-lyskom)))))) (error (lyskom-get-string 'no-unread-lyskom))))))
;;; ============================================================
;;; Var finns kommandot (kom-where-is)
;;; Author: David Byers
(def-kom-emacs-command kom-where-is (cmd)
"Show on which key a LysKOM command is"
(interactive
(list (lyskom-read-extended-command)))
(let ((w (where-is-internal cmd))
(msg nil))
(cond ((null cmd)
(setq msg (lyskom-format (lyskom-get-string 'where-is-doesnt-exist)
(lyskom-command-name cmd))))
((null w)
(setq msg (lyskom-format (lyskom-get-string 'where-is-on-no-key)
(lyskom-command-name cmd))))
(t (setq msg (lyskom-format (lyskom-get-string 'where-is-on-key)
(lyskom-command-name cmd)
(mapconcat
(lambda (x)
(format "`%s'" (key-description x)))
w ", ")))))
(if kom-where-is-running-as-kom-command
(lyskom-insert-before-prompt (concat msg "\n"))
(message msg))))
;;;============================================================ ;;;============================================================
;;; Visa user-arean (kom-show-user-area) ;;; Visa user-arean (kom-show-user-area)
;;; ;;;
......
...@@ -472,8 +472,8 @@ so it's not as clean as it ought to be." ...@@ -472,8 +472,8 @@ so it's not as clean as it ought to be."
(interactive) (interactive)
(if (and (lyskom-default-value 'lyskom-is-anonymous) (if (and (lyskom-default-value 'lyskom-is-anonymous)
(lyskom-j-or-n-p 'do-send-anonymous t)) (lyskom-j-or-n-p 'do-send-anonymous t))
(lyskom-edit-send 'initiate-create-anonymous-text t) (lyskom-edit-send 'initiate-create-anonymous-text t)
(lyskom-edit-send 'initiate-create-text nil))) (lyskom-edit-send 'initiate-create-text nil)))
(defun lyskom-edit-send (send-function &optional never-mark-as-read) (defun lyskom-edit-send (send-function &optional never-mark-as-read)
"Send the text to the server by calling SEND-FUNCTION." "Send the text to the server by calling SEND-FUNCTION."
...@@ -1418,14 +1418,10 @@ Point must be located on the line where the subject is." ...@@ -1418,14 +1418,10 @@ Point must be located on the line where the subject is."
"Get text as a string." "Get text as a string."
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
(if (not (or (re-search-forward (if (not (search-forward
(substitute-command-keys (substitute-command-keys
(lyskom-get-string 'header-separator)) (lyskom-get-string 'header-separator))
nil (point-max)) nil (point-max)))
(search-forward
(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.")
(buffer-substring (1+ (point)) (buffer-substring (1+ (point))
...@@ -1473,7 +1469,7 @@ Point must be located on the line where the subject is." ...@@ -1473,7 +1469,7 @@ Point must be located on the line where the subject is."
(cond (cond
((and kom-created-texts-are-read ((and kom-created-texts-are-read
never-mark-as-read) (not never-mark-as-read))
(lyskom-is-read text-no) (lyskom-is-read text-no)
(initiate-get-text-stat 'background 'lyskom-mark-as-read (initiate-get-text-stat 'background 'lyskom-mark-as-read
text-no) text-no)
......
...@@ -747,7 +747,7 @@ The position lyskom-last-viewed will always remain visible." ...@@ -747,7 +747,7 @@ The position lyskom-last-viewed will always remain visible."
'(special-insert)) '(special-insert))
(condition-case val (condition-case val
(funcall fn (car bounds) (cdr bounds)) (funcall fn (car bounds) (cdr bounds))
(error (apply 'message (cdr val)))) (error (apply 'message "%S" val)))
(setq start next) (setq start next)
(setq bounds (next-text-property-bounds 1 start (setq bounds (next-text-property-bounds 1 start
'special-insert)))) 'special-insert))))
...@@ -1485,7 +1485,14 @@ in lyskom-messages." ...@@ -1485,7 +1485,14 @@ in lyskom-messages."
(defun lyskom-w3-region (start end) (defun lyskom-w3-region (start end)
(w3-region start end) (when kom-w3-simplify-body
(save-excursion
(let ((case-fold-search t))
(goto-char start)
(while (re-search-forward "<body[^>]*>" end t)
(replace-match "<body>")))))
(w3-region start end)
(w3-finish-drawing) (w3-finish-drawing)
(add-text-properties start (min (point-max) end) '(end-closed nil))) (add-text-properties start (min (point-max) end) '(end-closed nil)))
......
...@@ -1092,6 +1092,12 @@ Uppkopplad sedan %#8s%#9s") ...@@ -1092,6 +1092,12 @@ Uppkopplad sedan %#8s%#9s")
(anonymous . "anonym") (anonymous . "anonym")
(Anonymous . "Anonym") (Anonymous . "Anonym")
;; Some Help
(where-is-doesnt-exist . "Kommandot %#1s finns inte")
(where-is-on-no-key . "%#1s finns inte p ngon tangent")
(where-is-on-key . "%#1s finns p %#2s")
;; From aux-items.el ;; From aux-items.el
(content-type-aux . "Innehllstyp: %#1s") (content-type-aux . "Innehllstyp: %#1s")
...@@ -1325,6 +1331,8 @@ Inneh ...@@ -1325,6 +1331,8 @@ Inneh
(kom-calculate . "Berkna") (kom-calculate . "Berkna")
(kom-list-marks . "Lista markeringar") (kom-list-marks . "Lista markeringar")
(kom-where-is . "Var finns kommandot")
(kom-fast-reply . "Snabb replik") (kom-fast-reply . "Snabb replik")
(kom-agree . "Hlla med") (kom-agree . "Hlla med")
......
...@@ -1113,6 +1113,8 @@ ordinary LysKOM texts." ...@@ -1113,6 +1113,8 @@ ordinary LysKOM texts."
kom-change-language kom-change-language
kom-calculate kom-calculate
kom-where-is
kom-next-kom kom-next-kom
kom-previous-kom kom-previous-kom
kom-next-unread-kom kom-next-unread-kom
...@@ -1787,6 +1789,9 @@ an unknown person.") ...@@ -1787,6 +1789,9 @@ an unknown person.")
(def-kom-var kom-no-comments-to-motd nil (def-kom-var kom-no-comments-to-motd nil
"This should always be set to nil unless you are Klaus Zeuge.") ;+++SOJGE "This should always be set to nil unless you are Klaus Zeuge.") ;+++SOJGE
(def-kom-var kom-w3-simplify-body t
"Strip color information from body tag.")
(def-kom-var lyskom-format-special (def-kom-var lyskom-format-special
'(("html" . lyskom-format-html) '(("html" . lyskom-format-html)
("enriched" . lyskom-format-enriched) ("enriched" . lyskom-format-enriched)
......
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