aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el35
1 files changed, 30 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a4ea345ca5f..1e6e5e11e00 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6731,7 +6731,8 @@ If Transient Mark mode is disabled, this function normally does
6731nothing; but if FORCE is non-nil, it deactivates the mark anyway. 6731nothing; but if FORCE is non-nil, it deactivates the mark anyway.
6732 6732
6733Deactivating the mark sets `mark-active' to nil, updates the 6733Deactivating the mark sets `mark-active' to nil, updates the
6734primary selection according to `select-active-regions', and runs 6734primary selection according to `select-active-regions' (unless
6735`deactivate-mark' is `dont-save'), and runs
6735`deactivate-mark-hook'. 6736`deactivate-mark-hook'.
6736 6737
6737If Transient Mark mode was temporarily enabled, reset the value 6738If Transient Mark mode was temporarily enabled, reset the value
@@ -6742,6 +6743,7 @@ run `deactivate-mark-hook'."
6742 (when (and (if (eq select-active-regions 'only) 6743 (when (and (if (eq select-active-regions 'only)
6743 (eq (car-safe transient-mark-mode) 'only) 6744 (eq (car-safe transient-mark-mode) 'only)
6744 select-active-regions) 6745 select-active-regions)
6746 (not (eq deactivate-mark 'dont-save))
6745 (region-active-p) 6747 (region-active-p)
6746 (display-selections-p)) 6748 (display-selections-p))
6747 ;; The var `saved-region-selection', if non-nil, is the text in 6749 ;; The var `saved-region-selection', if non-nil, is the text in
@@ -7690,11 +7692,33 @@ not vscroll."
7690 ;; But don't vscroll in a keyboard macro. 7692 ;; But don't vscroll in a keyboard macro.
7691 (not defining-kbd-macro) 7693 (not defining-kbd-macro)
7692 (not executing-kbd-macro) 7694 (not executing-kbd-macro)
7695 ;; Lines are not truncated...
7696 (not
7697 (and
7698 (or truncate-lines
7699 (and (integerp truncate-partial-width-windows)
7700 (< (window-total-width)
7701 truncate-partial-width-windows))
7702 (and truncate-partial-width-windows
7703 (not (integerp truncate-partial-width-windows))
7704 (not (window-full-width-p))))
7705 ;; ...or if lines are truncated, this buffer
7706 ;; doesn't have very long lines.
7707 (long-line-optimizations-p)))
7693 (line-move-partial arg noerror)) 7708 (line-move-partial arg noerror))
7694 (set-window-vscroll nil 0 t) 7709 (set-window-vscroll nil 0 t)
7695 (if (and line-move-visual 7710 (if (and line-move-visual
7696 ;; Display-based column are incompatible with goal-column. 7711 ;; Display-based column are incompatible with goal-column.
7697 (not goal-column) 7712 (not goal-column)
7713 ;; Lines aren't truncated.
7714 (not
7715 (or truncate-lines
7716 (and (integerp truncate-partial-width-windows)
7717 (< (window-width)
7718 truncate-partial-width-windows))
7719 (and truncate-partial-width-windows
7720 (not (integerp truncate-partial-width-windows))
7721 (not (window-full-width-p)))))
7698 ;; When the text in the window is scrolled to the left, 7722 ;; When the text in the window is scrolled to the left,
7699 ;; display-based motion doesn't make sense (because each 7723 ;; display-based motion doesn't make sense (because each
7700 ;; logical line occupies exactly one screen line). 7724 ;; logical line occupies exactly one screen line).
@@ -8131,10 +8155,11 @@ For motion by visual lines, see `beginning-of-visual-line'."
8131 (line-move (1- arg) t))) 8155 (line-move (1- arg) t)))
8132 8156
8133 ;; Move to beginning-of-line, ignoring fields and invisible text. 8157 ;; Move to beginning-of-line, ignoring fields and invisible text.
8134 (skip-chars-backward "^\n") 8158 (let ((inhibit-field-text-motion t))
8135 (while (and (not (bobp)) (invisible-p (1- (point)))) 8159 (goto-char (line-beginning-position))
8136 (goto-char (previous-char-property-change (point))) 8160 (while (and (not (bobp)) (invisible-p (1- (point))))
8137 (skip-chars-backward "^\n")) 8161 (goto-char (previous-char-property-change (point)))
8162 (goto-char (line-beginning-position))))
8138 8163
8139 ;; Now find first visible char in the line. 8164 ;; Now find first visible char in the line.
8140 (while (and (< (point) orig) (invisible-p (point))) 8165 (while (and (< (point) orig) (invisible-p (point)))