Commit 8f782781 authored by David Byers's avatar David Byers

Merge master

parents 3e521d85 41ffda74
2020-09-04 Per Cederqvist <ceder@lysator.liu.se>
Isolate bidi directionality changes to a single text.
* view-text.el (lyskom-print-text): Insert a paragraph separator
if the bidi directionality was changed by the text.
2020-08-17 Per Cederqvist <ceder@lysator.liu.se>
Emacs 27.1 compatibility.
* view-text.el (lyskom-subtract-one-day): Keep any sub-second time
elements unchanged, so that we return a valid time format. Emacs
27.1 expects it to be on the (HI LO US PS) form, and decode-time
will raise an error if it is on the (HI LO nil) form that
lyskom-subtract-one-day previously returned.
2020-08-17 David Byers <david.byers@liu.se>
* option-edit.el (lyskom-customize-help): Pass format string to
......
......@@ -720,7 +720,7 @@ for details."
(setq high-x (1- high-x)
low-x (+ low-x 65536)))
(setq low-x (- low-x 20864))
(nconc (list high-x low-x) (nthcdr 2 x))))
(cons high-x (cons low-x (cdr (cdr x))))))
(defun lyskom-calculate-day-diff (time)
"Determine if TIME is during the current or previous day.
......@@ -890,7 +890,8 @@ Mark the text as read if (and only if) MARK-AS-READ is non-nil.
Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW."
(let* ((lyskom-current-function 'lyskom-print-text)
(cti (lyskom-get-aux-item (text-stat->aux-items text-stat) 1))
(content-type (and cti (aux-item->data (car cti)))))
(content-type (and cti (aux-item->data (car cti))))
(bidi-at-start (current-bidi-paragraph-direction)))
(cond
((or (null text)
(null text-stat))
......@@ -1019,6 +1020,23 @@ Args: TEXT-STAT TEXT MARK-AS-READ TEXT-NO FLAT-REVIEW."
(when kom-highlight-dashed-lines
`(face ,(or kom-dashed-lines-face
lyskom-default-dashed-lines-face)))))))
;; If the last paragraph of the text has a different bidi
;; direction than the default bidi direction in this buffer,
;; insert a newline so that the rest of the buffer will get
;; its direction from the prompt.
;;
;; Perhaps it would be more correct to always insert a newline
;; before the text and after the text, so that the text always
;; has a bidi direction that is independent from the bidi
;; direction of the prompts, headers and footers, but that
;; would be too large a departure from the classical layout of
;; a LysKOM buffer. If there were an invisible way to specify
;; a paragraph break at those positions, that would be nice.
;; For now, we live with this workaround.
(unless (eq (current-bidi-paragraph-direction) bidi-at-start)
(insert "\n"))
(if mark-as-read
(lyskom-mark-as-read text-stat))
(setq lyskom-previous-text lyskom-current-text)
......
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