diff options
| -rw-r--r-- | Makefile.in | 54 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 30 | ||||
| -rw-r--r-- | lisp/gnus/gnus-cus.el | 4 | ||||
| -rw-r--r-- | lisp/help.el | 5 | ||||
| -rw-r--r-- | lisp/outline.el | 82 | ||||
| -rw-r--r-- | lisp/simple.el | 11 |
6 files changed, 103 insertions, 83 deletions
diff --git a/Makefile.in b/Makefile.in index c8418047577..79a1d4204ca 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -380,37 +380,37 @@ bootstrap-all: | |||
| 380 | actual-all: ${SUBDIR} info $(gsettings_SCHEMAS:.xml=.valid) src-depending-on-lisp | 380 | actual-all: ${SUBDIR} info $(gsettings_SCHEMAS:.xml=.valid) src-depending-on-lisp |
| 381 | 381 | ||
| 382 | # ADVICE-ON-FAILURE-BEGIN:all | 382 | # ADVICE-ON-FAILURE-BEGIN:all |
| 383 | # You might try to: | 383 | # You might try to: |
| 384 | # - run "make bootstrap", which might fix the problem | 384 | # - run "make bootstrap", which might fix the problem |
| 385 | # - run "make V=1", which displays the full commands invoked by make, | 385 | # - run "make V=1", which displays the full commands invoked by make, |
| 386 | # to further investigate the problem | 386 | # to further investigate the problem |
| 387 | # ADVICE-ON-FAILURE-END:all | 387 | # ADVICE-ON-FAILURE-END:all |
| 388 | 388 | ||
| 389 | # ADVICE-ON-FAILURE-BEGIN:bootstrap | 389 | # ADVICE-ON-FAILURE-BEGIN:bootstrap |
| 390 | # You might try to: | 390 | # You might try to: |
| 391 | # - run "make extraclean" and run "make" again (or, equivalently, run | 391 | # - run "make extraclean" and run "make" again (or, equivalently, run |
| 392 | # "make bootstrap configure=default"), to rebuild Emacs with the | 392 | # "make bootstrap configure=default"), to rebuild Emacs with the |
| 393 | # default configuration options, which might fix the problem | 393 | # default configuration options, which might fix the problem |
| 394 | # - run "git clean -fdx" and run "make bootstrap" again, which might | 394 | # - run "git clean -fdx" and run "make bootstrap" again, which might |
| 395 | # fix the problem if "make bootstrap configure=default" did not | 395 | # fix the problem if "make bootstrap configure=default" did not |
| 396 | # !BEWARE! "git clean -fdx" deletes all files that are not under | 396 | # !BEWARE! "git clean -fdx" deletes all files that are not under |
| 397 | # !BEWARE! version control, which means that all changes to such | 397 | # !BEWARE! version control, which means that all changes to such |
| 398 | # !BEWARE! files will be lost and cannot be restored later | 398 | # !BEWARE! files will be lost and cannot be restored later |
| 399 | # - run "make V=1", which displays the full commands invoked by make, | 399 | # - run "make V=1", which displays the full commands invoked by make, |
| 400 | # to further investigate the problem | 400 | # to further investigate the problem |
| 401 | # - report the problem and ask for help by sending an email to | 401 | # - report the problem and ask for help by sending an email to |
| 402 | # bug-gnu-emacs@gnu.org, mentioning at least the build error | 402 | # bug-gnu-emacs@gnu.org, mentioning at least the build error |
| 403 | # message, the platform, and the repository revision displayed by | 403 | # message, the platform, and the repository revision displayed by |
| 404 | # "git rev-parse HEAD" | 404 | # "git rev-parse HEAD" |
| 405 | # ADVICE-ON-FAILURE-END:bootstrap | 405 | # ADVICE-ON-FAILURE-END:bootstrap |
| 406 | 406 | ||
| 407 | advice-on-failure: | 407 | advice-on-failure: |
| 408 | @echo | 408 | @echo >&2 '***' |
| 409 | @echo " \"make ${make-target}\" failed with exit status ${exit-status}." | 409 | @echo >&2 '*** '"\"make ${make-target}\" failed with exit status ${exit-status}." |
| 410 | @cat Makefile | \ | 410 | @cat Makefile | \ |
| 411 | sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ | 411 | sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ |
| 412 | sed 's/^# //' | grep -v '^ADVICE-ON-FAILURE-' | 412 | sed 's/^# /*** /' | grep -v '^*** ADVICE-ON-FAILURE-' >&2 |
| 413 | @echo | 413 | @echo >&2 '***' |
| 414 | @exit ${exit-status} | 414 | @exit ${exit-status} |
| 415 | 415 | ||
| 416 | sanity-check: | 416 | sanity-check: |
| @@ -418,12 +418,12 @@ sanity-check: | |||
| 418 | '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ | 418 | '(progn (defun f (n) (if (= 0 n) 1 (* n (f (- n 1))))) (princ (f 10)))' \ |
| 419 | 2> /dev/null); \ | 419 | 2> /dev/null); \ |
| 420 | [ "X$$v" = "X3628800" ] && exit 0; \ | 420 | [ "X$$v" = "X3628800" ] && exit 0; \ |
| 421 | echo; \ | 421 | echo >&2 '***'; \ |
| 422 | echo " \"make ${make-target}\" succeeded, but Emacs is not functional."; \ | 422 | echo >&2 '*** '"\"make ${make-target}\" succeeded, but Emacs is not functional."; \ |
| 423 | cat Makefile | \ | 423 | cat Makefile | \ |
| 424 | sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ | 424 | sed -n '/^# ADVICE-ON-FAILURE-BEGIN:${make-target}/,$${p;/^# ADVICE-ON-FAILURE-END:${make-target}/q};' | \ |
| 425 | sed 's/^# //' | grep -v '^ADVICE-ON-FAILURE-'; \ | 425 | sed 's/^# /*** /' | grep -v '^*** ADVICE-ON-FAILURE-' >&2; \ |
| 426 | echo; \ | 426 | echo >&2 '***'; \ |
| 427 | exit 1 | 427 | exit 1 |
| 428 | 428 | ||
| 429 | .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver | 429 | .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver |
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 262b86672da..e38a81d3e7e 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -2997,17 +2997,25 @@ explicit focus notifications.) | |||
| 2997 | @end defun | 2997 | @end defun |
| 2998 | 2998 | ||
| 2999 | @defvar after-focus-change-function | 2999 | @defvar after-focus-change-function |
| 3000 | This function is an extension point that code can use to receive a | 3000 | This function is called with no arguments when Emacs notices that a |
| 3001 | notification that focus has changed. | 3001 | frame may have gotten or lost focus. Focus events are delivered |
| 3002 | 3002 | asynchronously, and may not be delivered in the expected order, so | |
| 3003 | This function is called with no arguments when Emacs notices that the | 3003 | code that wants to do something depending on the state of focused |
| 3004 | set of focused frames may have changed. Code wanting to do something | 3004 | frames have go through all the frames and check. |
| 3005 | when frame focus changes should use @code{add-function} to add a | 3005 | |
| 3006 | function to this one, and in this added function, re-scan the set of | 3006 | For instance, here's a simple example function that sets the |
| 3007 | focused frames, calling @code{frame-focus-state} to retrieve the last | 3007 | background color based on whether the frame has focus or not: |
| 3008 | known focus state of each frame. Focus events are delivered | 3008 | |
| 3009 | asynchronously, and frame input focus according to an external system | 3009 | @lisp |
| 3010 | may not correspond to the notion of the Emacs selected frame. | 3010 | (add-function :after after-focus-change-function |
| 3011 | #'my-change-background) | ||
| 3012 | (defun my-change-background () | ||
| 3013 | (dolist (frame (frame-list)) | ||
| 3014 | (pcase (frame-focus-state frame) | ||
| 3015 | (`t (set-face-background 'default "black" frame)) | ||
| 3016 | (`nil (set-face-background 'default "#404040" frame))))) | ||
| 3017 | @end lisp | ||
| 3018 | |||
| 3011 | Multiple frames may appear to have input focus simultaneously due to | 3019 | Multiple frames may appear to have input focus simultaneously due to |
| 3012 | focus event delivery differences, the presence of multiple Emacs | 3020 | focus event delivery differences, the presence of multiple Emacs |
| 3013 | terminals, and other factors, and code should be robust in the face of | 3021 | terminals, and other factors, and code should be robust in the face of |
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index ddd939794dd..32c475239e5 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el | |||
| @@ -36,11 +36,11 @@ | |||
| 36 | (define-derived-mode gnus-custom-mode fundamental-mode "Gnus Customize" | 36 | (define-derived-mode gnus-custom-mode fundamental-mode "Gnus Customize" |
| 37 | "Major mode for editing Gnus customization buffers. | 37 | "Major mode for editing Gnus customization buffers. |
| 38 | 38 | ||
| 39 | The following commands are available: | 39 | The following commands are available:\\<widget-keymap> |
| 40 | 40 | ||
| 41 | \\[widget-forward] Move to next button or editable field. | 41 | \\[widget-forward] Move to next button or editable field. |
| 42 | \\[widget-backward] Move to previous button or editable field. | 42 | \\[widget-backward] Move to previous button or editable field. |
| 43 | \\[widget-button-click] Activate button under the mouse pointer. | 43 | \\[widget-button-click] Activate button under the mouse pointer. |
| 44 | \\[widget-button-press] Activate button under point. | 44 | \\[widget-button-press] Activate button under point. |
| 45 | 45 | ||
| 46 | Entry to this mode calls the value of `gnus-custom-mode-hook' | 46 | Entry to this mode calls the value of `gnus-custom-mode-hook' |
diff --git a/lisp/help.el b/lisp/help.el index 92b87cf7999..0ec5b9c85b8 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -1204,7 +1204,10 @@ Otherwise, return a new string." | |||
| 1204 | (delete-char 2) | 1204 | (delete-char 2) |
| 1205 | (let* ((fun (intern (buffer-substring (point) (1- end-point)))) | 1205 | (let* ((fun (intern (buffer-substring (point) (1- end-point)))) |
| 1206 | (key (with-current-buffer orig-buf | 1206 | (key (with-current-buffer orig-buf |
| 1207 | (where-is-internal fun keymap t)))) | 1207 | (where-is-internal fun |
| 1208 | (and keymap | ||
| 1209 | (list keymap)) | ||
| 1210 | t)))) | ||
| 1208 | (if (not key) | 1211 | (if (not key) |
| 1209 | ;; Function is not on any key. | 1212 | ;; Function is not on any key. |
| 1210 | (let ((op (point))) | 1213 | (let ((op (point))) |
diff --git a/lisp/outline.el b/lisp/outline.el index 3aebc25e130..3503ba2265e 100644 --- a/lisp/outline.el +++ b/lisp/outline.el | |||
| @@ -490,6 +490,10 @@ See the command `outline-mode' for more information on this mode." | |||
| 490 | :keymap (define-keymap | 490 | :keymap (define-keymap |
| 491 | :parent outline-minor-mode-cycle-map | 491 | :parent outline-minor-mode-cycle-map |
| 492 | "<menu-bar>" outline-minor-mode-menu-bar-map | 492 | "<menu-bar>" outline-minor-mode-menu-bar-map |
| 493 | "<left-margin> <mouse-1>" 'outline-cycle | ||
| 494 | "<right-margin> <mouse-1>" 'outline-cycle | ||
| 495 | "<left-margin> S-<mouse-1>" 'outline-cycle-buffer | ||
| 496 | "<right-margin> S-<mouse-1>" 'outline-cycle-buffer | ||
| 493 | (key-description outline-minor-mode-prefix) outline-mode-prefix-map) | 497 | (key-description outline-minor-mode-prefix) outline-mode-prefix-map) |
| 494 | (if outline-minor-mode | 498 | (if outline-minor-mode |
| 495 | (progn | 499 | (progn |
| @@ -1051,9 +1055,10 @@ Note that this does not hide the lines preceding the first heading line." | |||
| 1051 | "Hide everything after this heading at deeper levels. | 1055 | "Hide everything after this heading at deeper levels. |
| 1052 | If non-nil, EVENT should be a mouse event." | 1056 | If non-nil, EVENT should be a mouse event." |
| 1053 | (interactive (list last-nonmenu-event)) | 1057 | (interactive (list last-nonmenu-event)) |
| 1054 | (when (mouse-event-p event) | 1058 | (save-excursion |
| 1055 | (mouse-set-point event)) | 1059 | (when (mouse-event-p event) |
| 1056 | (outline-flag-subtree t)) | 1060 | (mouse-set-point event)) |
| 1061 | (outline-flag-subtree t))) | ||
| 1057 | 1062 | ||
| 1058 | (defun outline--make-button-overlay (type) | 1063 | (defun outline--make-button-overlay (type) |
| 1059 | (let ((o (seq-find (lambda (o) | 1064 | (let ((o (seq-find (lambda (o) |
| @@ -1061,6 +1066,7 @@ If non-nil, EVENT should be a mouse event." | |||
| 1061 | (overlays-at (point))))) | 1066 | (overlays-at (point))))) |
| 1062 | (unless o | 1067 | (unless o |
| 1063 | (setq o (make-overlay (point) (1+ (point)))) | 1068 | (setq o (make-overlay (point) (1+ (point)))) |
| 1069 | (overlay-put o 'evaporate t) | ||
| 1064 | (overlay-put o 'follow-link 'mouse-face) | 1070 | (overlay-put o 'follow-link 'mouse-face) |
| 1065 | (overlay-put o 'mouse-face 'highlight) | 1071 | (overlay-put o 'mouse-face 'highlight) |
| 1066 | (overlay-put o 'outline-button t)) | 1072 | (overlay-put o 'outline-button t)) |
| @@ -1088,8 +1094,7 @@ If non-nil, EVENT should be a mouse event." | |||
| 1088 | (overlays-at (point))))) | 1094 | (overlays-at (point))))) |
| 1089 | (unless o | 1095 | (unless o |
| 1090 | (setq o (make-overlay (point) (1+ (point)))) | 1096 | (setq o (make-overlay (point) (1+ (point)))) |
| 1091 | (overlay-put o 'follow-link 'mouse-face) | 1097 | (overlay-put o 'evaporate t) |
| 1092 | (overlay-put o 'mouse-face 'highlight) | ||
| 1093 | (overlay-put o 'outline-margin t)) | 1098 | (overlay-put o 'outline-margin t)) |
| 1094 | (let ((icon (icon-elements (if (eq type 'close) | 1099 | (let ((icon (icon-elements (if (eq type 'close) |
| 1095 | (if outline--use-rtl | 1100 | (if outline--use-rtl |
| @@ -1111,11 +1116,7 @@ If non-nil, EVENT should be a mouse event." | |||
| 1111 | (save-excursion | 1116 | (save-excursion |
| 1112 | (beginning-of-line) | 1117 | (beginning-of-line) |
| 1113 | (if use-margins | 1118 | (if use-margins |
| 1114 | (let ((o (outline--make-margin-overlay 'open))) | 1119 | (outline--make-margin-overlay 'open) |
| 1115 | (overlay-put o 'help-echo "Click to hide") | ||
| 1116 | (overlay-put o 'keymap | ||
| 1117 | (define-keymap | ||
| 1118 | "<mouse-2>" #'outline-hide-subtree))) | ||
| 1119 | (when (derived-mode-p 'special-mode) | 1120 | (when (derived-mode-p 'special-mode) |
| 1120 | (let ((inhibit-read-only t)) | 1121 | (let ((inhibit-read-only t)) |
| 1121 | (insert " ") | 1122 | (insert " ") |
| @@ -1125,19 +1126,14 @@ If non-nil, EVENT should be a mouse event." | |||
| 1125 | (overlay-put o 'keymap | 1126 | (overlay-put o 'keymap |
| 1126 | (define-keymap | 1127 | (define-keymap |
| 1127 | "RET" #'outline-hide-subtree | 1128 | "RET" #'outline-hide-subtree |
| 1128 | "<mouse-2>" #'outline-hide-subtree | 1129 | "<mouse-2>" #'outline-hide-subtree))))))) |
| 1129 | "<left-margin> <mouse-1>" #'outline-hide-subtree))))))) | ||
| 1130 | 1130 | ||
| 1131 | (defun outline--insert-close-button (&optional use-margins) | 1131 | (defun outline--insert-close-button (&optional use-margins) |
| 1132 | (with-silent-modifications | 1132 | (with-silent-modifications |
| 1133 | (save-excursion | 1133 | (save-excursion |
| 1134 | (beginning-of-line) | 1134 | (beginning-of-line) |
| 1135 | (if use-margins | 1135 | (if use-margins |
| 1136 | (let ((o (outline--make-margin-overlay 'close))) | 1136 | (outline--make-margin-overlay 'close) |
| 1137 | (overlay-put o 'help-echo "Click to show") | ||
| 1138 | (overlay-put o 'keymap | ||
| 1139 | (define-keymap | ||
| 1140 | "<mouse-2>" #'outline-show-subtree))) | ||
| 1141 | (when (derived-mode-p 'special-mode) | 1137 | (when (derived-mode-p 'special-mode) |
| 1142 | (let ((inhibit-read-only t)) | 1138 | (let ((inhibit-read-only t)) |
| 1143 | (insert " ") | 1139 | (insert " ") |
| @@ -1147,8 +1143,7 @@ If non-nil, EVENT should be a mouse event." | |||
| 1147 | (overlay-put o 'keymap | 1143 | (overlay-put o 'keymap |
| 1148 | (define-keymap | 1144 | (define-keymap |
| 1149 | "RET" #'outline-show-subtree | 1145 | "RET" #'outline-show-subtree |
| 1150 | "<mouse-2>" #'outline-show-subtree | 1146 | "<mouse-2>" #'outline-show-subtree))))))) |
| 1151 | "<left-margin> <mouse-1>" #'outline-show-subtree))))))) | ||
| 1152 | 1147 | ||
| 1153 | (defun outline--fix-up-all-buttons (&optional from to) | 1148 | (defun outline--fix-up-all-buttons (&optional from to) |
| 1154 | (when (or outline--use-buttons outline--use-margins) | 1149 | (when (or outline--use-buttons outline--use-margins) |
| @@ -1182,11 +1177,13 @@ If non-nil, EVENT should be a mouse event." | |||
| 1182 | (define-obsolete-function-alias 'hide-leaves #'outline-hide-leaves "25.1") | 1177 | (define-obsolete-function-alias 'hide-leaves #'outline-hide-leaves "25.1") |
| 1183 | 1178 | ||
| 1184 | (defun outline-show-subtree (&optional event) | 1179 | (defun outline-show-subtree (&optional event) |
| 1185 | "Show everything after this heading at deeper levels." | 1180 | "Show everything after this heading at deeper levels. |
| 1181 | If non-nil, EVENT should be a mouse event." | ||
| 1186 | (interactive (list last-nonmenu-event)) | 1182 | (interactive (list last-nonmenu-event)) |
| 1187 | (when (mouse-event-p event) | 1183 | (save-excursion |
| 1188 | (mouse-set-point event)) | 1184 | (when (mouse-event-p event) |
| 1189 | (outline-flag-subtree nil)) | 1185 | (mouse-set-point event)) |
| 1186 | (outline-flag-subtree nil))) | ||
| 1190 | 1187 | ||
| 1191 | (define-obsolete-function-alias 'show-subtree #'outline-show-subtree "25.1") | 1188 | (define-obsolete-function-alias 'show-subtree #'outline-show-subtree "25.1") |
| 1192 | 1189 | ||
| @@ -1661,7 +1658,7 @@ Return either `hide-all', `headings-only', or `show-all'." | |||
| 1661 | (< (save-excursion (outline-next-heading) (point)) | 1658 | (< (save-excursion (outline-next-heading) (point)) |
| 1662 | (save-excursion (outline-end-of-subtree) (point))))) | 1659 | (save-excursion (outline-end-of-subtree) (point))))) |
| 1663 | 1660 | ||
| 1664 | (defun outline-cycle () | 1661 | (defun outline-cycle (&optional event) |
| 1665 | "Cycle visibility state of the current heading line's body. | 1662 | "Cycle visibility state of the current heading line's body. |
| 1666 | 1663 | ||
| 1667 | This cycles the visibility of the current heading line's subheadings | 1664 | This cycles the visibility of the current heading line's subheadings |
| @@ -1669,23 +1666,28 @@ and body between `hide all', `headings only' and `show all'. | |||
| 1669 | 1666 | ||
| 1670 | `Hide all' means hide all the subheadings and their bodies. | 1667 | `Hide all' means hide all the subheadings and their bodies. |
| 1671 | `Headings only' means show the subheadings, but not their bodies. | 1668 | `Headings only' means show the subheadings, but not their bodies. |
| 1672 | `Show all' means show all the subheadings and their bodies." | 1669 | `Show all' means show all the subheadings and their bodies. |
| 1673 | (interactive) | 1670 | |
| 1674 | (condition-case nil | 1671 | If non-nil, EVENT should be a mouse event." |
| 1675 | (pcase (outline--cycle-state) | 1672 | (interactive (list last-nonmenu-event)) |
| 1676 | ('hide-all | 1673 | (save-excursion |
| 1677 | (if (outline-has-subheading-p) | 1674 | (when (mouse-event-p event) |
| 1678 | (progn (outline-show-children) | 1675 | (mouse-set-point event)) |
| 1679 | (message "Only headings")) | 1676 | (condition-case nil |
| 1677 | (pcase (outline--cycle-state) | ||
| 1678 | ('hide-all | ||
| 1679 | (if (outline-has-subheading-p) | ||
| 1680 | (progn (outline-show-children) | ||
| 1681 | (message "Only headings")) | ||
| 1682 | (outline-show-subtree) | ||
| 1683 | (message "Show all"))) | ||
| 1684 | ('headings-only | ||
| 1680 | (outline-show-subtree) | 1685 | (outline-show-subtree) |
| 1681 | (message "Show all"))) | 1686 | (message "Show all")) |
| 1682 | ('headings-only | 1687 | ('show-all |
| 1683 | (outline-show-subtree) | 1688 | (outline-hide-subtree) |
| 1684 | (message "Show all")) | 1689 | (message "Hide all"))) |
| 1685 | ('show-all | 1690 | (outline-before-first-heading nil)))) |
| 1686 | (outline-hide-subtree) | ||
| 1687 | (message "Hide all"))) | ||
| 1688 | (outline-before-first-heading nil))) | ||
| 1689 | 1691 | ||
| 1690 | (defvar-local outline--cycle-buffer-state 'show-all | 1692 | (defvar-local outline--cycle-buffer-state 'show-all |
| 1691 | "Internal variable used for tracking buffer cycle state.") | 1693 | "Internal variable used for tracking buffer cycle state.") |
diff --git a/lisp/simple.el b/lisp/simple.el index 1b9bf9fa6d8..aed1547b15b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -6887,6 +6887,11 @@ The return value is t if Transient Mark mode is enabled and the | |||
| 6887 | mark is active; furthermore, if `use-empty-active-region' is nil, | 6887 | mark is active; furthermore, if `use-empty-active-region' is nil, |
| 6888 | the region must not be empty. Otherwise, the return value is nil. | 6888 | the region must not be empty. Otherwise, the return value is nil. |
| 6889 | 6889 | ||
| 6890 | If `use-empty-active-region' is non-nil, there is one further | ||
| 6891 | caveat: If the user has used `mouse-1' to set point, but used the | ||
| 6892 | mouse to move point to a different character yet, this function | ||
| 6893 | returns nil. | ||
| 6894 | |||
| 6890 | For some commands, it may be appropriate to ignore the value of | 6895 | For some commands, it may be appropriate to ignore the value of |
| 6891 | `use-empty-active-region'; in that case, use `region-active-p'. | 6896 | `use-empty-active-region'; in that case, use `region-active-p'. |
| 6892 | 6897 | ||
| @@ -6894,8 +6899,10 @@ Also see the convenience functions `use-region-beginning' and | |||
| 6894 | `use-region-end', which may be handy when writing `interactive' | 6899 | `use-region-end', which may be handy when writing `interactive' |
| 6895 | specs." | 6900 | specs." |
| 6896 | (and (region-active-p) | 6901 | (and (region-active-p) |
| 6897 | (or use-empty-active-region (> (region-end) (region-beginning))) | 6902 | (or (> (region-end) (region-beginning)) |
| 6898 | t)) | 6903 | (and use-empty-active-region |
| 6904 | (not (eq (car-safe last-input-event) 'down-mouse-1)) | ||
| 6905 | (not (mouse-movement-p last-input-event)))))) | ||
| 6899 | 6906 | ||
| 6900 | (defun region-active-p () | 6907 | (defun region-active-p () |
| 6901 | "Return t if Transient Mark mode is enabled and the mark is active. | 6908 | "Return t if Transient Mark mode is enabled and the mark is active. |