aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas2022-12-21 02:37:17 +0100
committerStefan Kangas2022-12-21 02:37:17 +0100
commit2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae (patch)
tree044d6aa99d0ef54ace6c01583231c1ae286c8865 /lisp
parent1424342225ef5b18c630364dd88e004f4ebb1c7f (diff)
parentd3a76db88b4357fe1c92f240796ea9b522b97a8e (diff)
downloademacs-2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae.tar.gz
emacs-2bbc554db63cc5cc140ade5bfcbbf53ecd18f5ae.zip
Merge from origin/emacs-29
d3a76db88b4 * lisp/repeat.el: Fix repeat-keep-prefix to allow customi... 8ef3777d544 Correct capitalization of Lisp in the manual (bug#60222) d03ea893780 eglot.el: Add vscode-json-languageserver to eglot-server-... 8550a993785 ; * src/emacs-module.h.in (enum emacs_funcall_exit): Fix ... fb7f3999c59 ; Fix ruby-method-params-indent's :version value cfbfd393b45 * lisp/progmodes/project.el (project--read-file-cpd-relat... 2b1fdbffcb5 ruby-method-params-indent: New user option b9e813f79f2 ; ruby-indent-level: Improve the docstring 399433cc2b9 * lisp/progmodes/project.el: Filter out empty strings fro... 23f7c9c2a92 Fix storing email into nnmail by Gnus 63cdbd986bb ; Really respect browse-url var in erc-compat 64163618d21 whitespace: Fix unintended change in buffer modification ... a75d1da911c Make emacsclient add abbreviated file names to file-name-... b3e7768a0ee Repair setopt test after error demotion to warning
Diffstat (limited to 'lisp')
-rw-r--r--lisp/erc/erc-compat.el10
-rw-r--r--lisp/erc/erc.el12
-rw-r--r--lisp/gnus/nnml.el13
-rw-r--r--lisp/progmodes/eglot.el1
-rw-r--r--lisp/progmodes/project.el4
-rw-r--r--lisp/progmodes/ruby-mode.el28
-rw-r--r--lisp/repeat.el117
-rw-r--r--lisp/server.el2
-rw-r--r--lisp/whitespace.el28
9 files changed, 138 insertions, 77 deletions
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index 77625398abd..fdcb146d42a 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -391,11 +391,11 @@ If START or END is negative, it counts from the end."
391 391
392(cond ((fboundp 'browse-url-irc)) ; 29 392(cond ((fboundp 'browse-url-irc)) ; 29
393 ((boundp 'browse-url-default-handlers) ; 28 393 ((boundp 'browse-url-default-handlers) ; 28
394 (setf (alist-get "\\`irc6?s?://" browse-url-default-handlers 394 (add-to-list 'browse-url-default-handlers
395 nil nil (lambda (a _) 395 '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
396 (and (stringp a) 396 nil (lambda (_ a)
397 (string-match-p a "irc://localhost")))) 397 (and (stringp (car-safe a))
398 #'erc-compat--29-browse-url-irc)) 398 (string-match-p (car a) "irc://localhost")))))
399 ((boundp 'browse-url-browser-function) ; 27 399 ((boundp 'browse-url-browser-function) ; 27
400 (require 'browse-url) 400 (require 'browse-url)
401 (let ((existing browse-url-browser-function)) 401 (let ((existing browse-url-browser-function))
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 6cfc39c4bda..6a5e0018964 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1765,8 +1765,7 @@ all channel buffers on all servers."
1765;; to, it was never realized. 1765;; to, it was never realized.
1766;; 1766;;
1767;; New library code should use the `erc--target' struct instead. 1767;; New library code should use the `erc--target' struct instead.
1768;; Third-party code can continue to use this until a getter for 1768;; Third-party code can continue to use this and `erc-default-target'.
1769;; `erc--target' (or whatever replaces it) is exported.
1770(defvar-local erc-default-recipients nil 1769(defvar-local erc-default-recipients nil
1771 "List of default recipients of the current buffer.") 1770 "List of default recipients of the current buffer.")
1772 1771
@@ -6012,13 +6011,14 @@ See also `erc-downcase'."
6012;; While `erc-default-target' happens to return nil in channel buffers 6011;; While `erc-default-target' happens to return nil in channel buffers
6013;; you've parted or from which you've been kicked, using it to detect 6012;; you've parted or from which you've been kicked, using it to detect
6014;; whether a channel is currently joined may become unreliable in the 6013;; whether a channel is currently joined may become unreliable in the
6015;; future. For now, new code should consider using 6014;; future. For now, third-party code can use
6016;; 6015;;
6017;; (erc-get-channel-user (erc-current-nick)) 6016;; (erc-get-channel-user (erc-current-nick))
6018;; 6017;;
6019;; and expect a nicer option eventually. For retrieving a target 6018;; A predicate may be provided eventually. For retrieving a target's
6020;; regardless of subscription or connection status, use replacements 6019;; name regardless of subscription or connection status, new library
6021;; based on `erc--target' instead. See also `erc--default-target'. 6020;; code should use `erc--default-target'. Third-party code should
6021;; continue to use `erc-default-target'.
6022 6022
6023(defun erc-default-target () 6023(defun erc-default-target ()
6024 "Return the current default target (as a character string) or nil if none." 6024 "Return the current default target (as a character string) or nil if none."
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index 40e4b9ea828..7aa445e6646 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -776,17 +776,22 @@ article number. This function is called narrowed to an article."
776 (nnml--encode-headers headers) 776 (nnml--encode-headers headers)
777 headers)))) 777 headers))))
778 778
779;; RFC2047-encode Subject and From, but leave invalid headers unencoded.
779(defun nnml--encode-headers (headers) 780(defun nnml--encode-headers (headers)
780 (let ((subject (mail-header-subject headers)) 781 (let ((subject (mail-header-subject headers))
781 (rfc2047-encoding-type 'mime)) 782 (rfc2047-encoding-type 'mime))
782 (unless (string-match "\\`[[:ascii:]]*\\'" subject) 783 (unless (string-match "\\`[[:ascii:]]*\\'" subject)
783 (setf (mail-header-subject headers) 784 (let ((encoded-subject
784 (mail-encode-encoded-word-string subject t)))) 785 (ignore-errors (mail-encode-encoded-word-string subject t))))
786 (if encoded-subject
787 (setf (mail-header-subject headers) encoded-subject)))))
785 (let ((from (mail-header-from headers)) 788 (let ((from (mail-header-from headers))
786 (rfc2047-encoding-type 'address-mime)) 789 (rfc2047-encoding-type 'address-mime))
787 (unless (string-match "\\`[[:ascii:]]*\\'" from) 790 (unless (string-match "\\`[[:ascii:]]*\\'" from)
788 (setf (mail-header-from headers) 791 (let ((encoded-from
789 (rfc2047-encode-string from t))))) 792 (ignore-errors (rfc2047-encode-string from t))))
793 (if encoded-from
794 (setf (mail-header-from headers) encoded-from))))))
790 795
791(defun nnml-get-nov-buffer (group &optional incrementalp) 796(defun nnml-get-nov-buffer (group &optional incrementalp)
792 (let ((buffer (gnus-get-buffer-create 797 (let ((buffer (gnus-get-buffer-create
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index ce4ca4f3d92..0f1bfd0447d 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -190,6 +190,7 @@ chosen (interactively or automatically)."
190 '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server"))) 190 '("pylsp" "pyls" ("pyright-langserver" "--stdio") "jedi-language-server")))
191 ((js-json-mode json-mode json-ts-mode) 191 ((js-json-mode json-mode json-ts-mode)
192 . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio") 192 . ,(eglot-alternatives '(("vscode-json-language-server" "--stdio")
193 ("vscode-json-languageserver" "--stdio")
193 ("json-languageserver" "--stdio")))) 194 ("json-languageserver" "--stdio"))))
194 ((js-mode js-ts-mode tsx-ts-mode typescript-ts-mode typescript-mode) 195 ((js-mode js-ts-mode tsx-ts-mode typescript-ts-mode typescript-mode)
195 . ("typescript-language-server" "--stdio")) 196 . ("typescript-language-server" "--stdio"))
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 559da6dd649..c2633798473 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1040,12 +1040,14 @@ by the user at will."
1040 (setq substrings (cons "./" substrings)))) 1040 (setq substrings (cons "./" substrings))))
1041 (new-collection (project--file-completion-table substrings)) 1041 (new-collection (project--file-completion-table substrings))
1042 (abbr-cpd (abbreviate-file-name common-parent-directory)) 1042 (abbr-cpd (abbreviate-file-name common-parent-directory))
1043 (abbr-cpd-length (length abbr-cpd))
1043 (relname (cl-letf ((history-add-new-input nil) 1044 (relname (cl-letf ((history-add-new-input nil)
1044 ((symbol-value hist) 1045 ((symbol-value hist)
1045 (mapcan 1046 (mapcan
1046 (lambda (s) 1047 (lambda (s)
1047 (and (string-prefix-p abbr-cpd s) 1048 (and (string-prefix-p abbr-cpd s)
1048 (list (substring s (length abbr-cpd))))) 1049 (not (eq abbr-cpd-length (length s)))
1050 (list (substring s abbr-cpd-length))))
1049 (symbol-value hist)))) 1051 (symbol-value hist))))
1050 (project--completing-read-strict prompt 1052 (project--completing-read-strict prompt
1051 new-collection 1053 new-collection
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index fa51597697f..1f3e9b6ae7b 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -212,7 +212,7 @@ It should match the part after \"def\" and until \"=\".")
212 :safe 'booleanp) 212 :safe 'booleanp)
213 213
214(defcustom ruby-indent-level 2 214(defcustom ruby-indent-level 2
215 "Indentation of Ruby statements." 215 "Number of spaces for each indentation step in `ruby-mode'."
216 :type 'integer 216 :type 'integer
217 :safe 'integerp) 217 :safe 'integerp)
218 218
@@ -268,6 +268,23 @@ Only has effect when `ruby-use-smie' is t."
268 :safe 'booleanp 268 :safe 'booleanp
269 :version "24.4") 269 :version "24.4")
270 270
271(defcustom ruby-method-params-indent t
272 "Indentation of multiline method parameters.
273
274When t, the parameters list is indented to the method name.
275
276When a number, indent the parameters list this many columns
277against the beginning of the method (the \"def\" keyword).
278
279The value nil means the same as 0.
280
281Only has effect when `ruby-use-smie' is t."
282 :type '(choice (const :tag "Indent to the method name" t)
283 (number :tag "Indent specified number of columns against def")
284 (const :tag "Indent to def" nil))
285 :safe (lambda (val) (or (memq val '(t nil)) (numberp val)))
286 :version "29.1")
287
271(defcustom ruby-deep-arglist t 288(defcustom ruby-deep-arglist t
272 "Deep indent lists in parenthesis when non-nil. 289 "Deep indent lists in parenthesis when non-nil.
273Also ignores spaces after parenthesis when `space'. 290Also ignores spaces after parenthesis when `space'.
@@ -660,9 +677,12 @@ This only affects the output of the command `ruby-toggle-block'."
660 (unless (or (eolp) (forward-comment 1)) 677 (unless (or (eolp) (forward-comment 1))
661 (cons 'column (current-column))))) 678 (cons 'column (current-column)))))
662 ('(:before . " @ ") 679 ('(:before . " @ ")
663 (save-excursion 680 (if (or (eq ruby-method-params-indent t)
664 (skip-chars-forward " \t") 681 (not (smie-rule-parent-p "def" "def=")))
665 (cons 'column (current-column)))) 682 (save-excursion
683 (skip-chars-forward " \t")
684 (cons 'column (current-column)))
685 (smie-rule-parent (or ruby-method-params-indent 0))))
666 ('(:before . "do") (ruby-smie--indent-to-stmt)) 686 ('(:before . "do") (ruby-smie--indent-to-stmt))
667 ('(:before . ".") 687 ('(:before . ".")
668 (if (smie-rule-sibling-p) 688 (if (smie-rule-sibling-p)
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 33e8d98ce33..3b3a444ee24 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -368,6 +368,13 @@ This property can override the value of this variable."
368(defcustom repeat-keep-prefix nil 368(defcustom repeat-keep-prefix nil
369 "Whether to keep the prefix arg of the previous command when repeating." 369 "Whether to keep the prefix arg of the previous command when repeating."
370 :type 'boolean 370 :type 'boolean
371 :initialize #'custom-initialize-default
372 :set (lambda (sym val)
373 (set-default sym val)
374 (when repeat-mode
375 (if repeat-keep-prefix
376 (add-hook 'pre-command-hook 'repeat-pre-hook)
377 (remove-hook 'pre-command-hook 'repeat-pre-hook))))
371 :group 'repeat 378 :group 'repeat
372 :version "28.1") 379 :version "28.1")
373 380
@@ -419,7 +426,11 @@ When Repeat mode is enabled, and the command symbol has the property named
419See `describe-repeat-maps' for a list of all repeatable commands." 426See `describe-repeat-maps' for a list of all repeatable commands."
420 :global t :group 'repeat 427 :global t :group 'repeat
421 (if (not repeat-mode) 428 (if (not repeat-mode)
422 (remove-hook 'post-command-hook 'repeat-post-hook) 429 (progn
430 (remove-hook 'pre-command-hook 'repeat-pre-hook)
431 (remove-hook 'post-command-hook 'repeat-post-hook))
432 (when repeat-keep-prefix
433 (add-hook 'pre-command-hook 'repeat-pre-hook))
423 (add-hook 'post-command-hook 'repeat-post-hook) 434 (add-hook 'post-command-hook 'repeat-post-hook)
424 (let* ((keymaps nil) 435 (let* ((keymaps nil)
425 (commands (all-completions 436 (commands (all-completions
@@ -431,15 +442,21 @@ See `describe-repeat-maps' for a list of all repeatable commands."
431 (length commands) 442 (length commands)
432 (length (delete-dups keymaps)))))) 443 (length (delete-dups keymaps))))))
433 444
434(defvar repeat--prev-mb '(0)
435 "Previous minibuffer state.")
436
437(defun repeat--command-property (property) 445(defun repeat--command-property (property)
438 (or (and (symbolp this-command) 446 (or (and (symbolp this-command)
439 (get this-command property)) 447 (get this-command property))
440 (and (symbolp real-this-command) 448 (and (symbolp real-this-command)
441 (get real-this-command property)))) 449 (get real-this-command property))))
442 450
451(defun repeat-get-map ()
452 "Return a transient map for keys repeatable after the current command."
453 (when repeat-mode
454 (let ((rep-map (or repeat-map (repeat--command-property 'repeat-map))))
455 (when rep-map
456 (when (and (symbolp rep-map) (boundp rep-map))
457 (setq rep-map (symbol-value rep-map)))
458 rep-map))))
459
443(defun repeat-check-key (key map) 460(defun repeat-check-key (key map)
444 "Check if the last key is suitable to activate the repeating MAP." 461 "Check if the last key is suitable to activate the repeating MAP."
445 (let* ((prop (repeat--command-property 'repeat-check-key)) 462 (let* ((prop (repeat--command-property 'repeat-check-key))
@@ -449,50 +466,61 @@ See `describe-repeat-maps' for a list of all repeatable commands."
449 ;; Try without modifiers: 466 ;; Try without modifiers:
450 (lookup-key map (vector (event-basic-type key)))))) 467 (lookup-key map (vector (event-basic-type key))))))
451 468
469(defvar repeat--prev-mb '(0)
470 "Previous minibuffer state.")
471
472(defun repeat-check-map (map)
473 "Decides whether MAP can be used for the next command."
474 (and map
475 ;; Detect changes in the minibuffer state to allow repetitions
476 ;; in the same minibuffer, but not when the minibuffer is activated
477 ;; in the middle of repeating sequence (bug#47566).
478 (or (< (minibuffer-depth) (car repeat--prev-mb))
479 (eq current-minibuffer-command (cdr repeat--prev-mb)))
480 (repeat-check-key last-command-event map)
481 t))
482
483(defun repeat-pre-hook ()
484 "Function run before commands to handle repeatable keys."
485 (when (and repeat-mode repeat-keep-prefix repeat-in-progress
486 (not prefix-arg) current-prefix-arg)
487 (let ((map (repeat-get-map)))
488 ;; Only when repeat-post-hook will activate the same map
489 (when (repeat-check-map map)
490 ;; Optimize to use less logic in the function `repeat-get-map'
491 ;; for the next call: when called again from `repeat-post-hook'
492 ;; it will use the variable `repeat-map'.
493 (setq repeat-map map)
494 ;; Preserve universal argument
495 (setq prefix-arg current-prefix-arg)))))
496
452(defun repeat-post-hook () 497(defun repeat-post-hook ()
453 "Function run after commands to set transient keymap for repeatable keys." 498 "Function run after commands to set transient keymap for repeatable keys."
454 (let ((was-in-progress repeat-in-progress)) 499 (let ((was-in-progress repeat-in-progress))
455 (setq repeat-in-progress nil) 500 (setq repeat-in-progress nil)
456 (when repeat-mode 501 (let ((map (repeat-get-map)))
457 (let ((rep-map (or repeat-map (repeat--command-property 'repeat-map)))) 502 (when (repeat-check-map map)
458 (when rep-map 503 ;; Messaging
459 (when (and (symbolp rep-map) (boundp rep-map)) 504 (funcall repeat-echo-function map)
460 (setq rep-map (symbol-value rep-map))) 505
461 (let ((map (copy-keymap rep-map))) 506 ;; Adding an exit key
462 507 (when repeat-exit-key
463 (when (and 508 (setq map (copy-keymap map))
464 ;; Detect changes in the minibuffer state to allow repetitions 509 (define-key map (if (key-valid-p repeat-exit-key)
465 ;; in the same minibuffer, but not when the minibuffer is activated 510 (kbd repeat-exit-key)
466 ;; in the middle of repeating sequence (bug#47566). 511 repeat-exit-key)
467 (or (< (minibuffer-depth) (car repeat--prev-mb)) 512 'ignore))
468 (eq current-minibuffer-command (cdr repeat--prev-mb))) 513
469 (or (not repeat-keep-prefix) prefix-arg) 514 (setq repeat-in-progress t)
470 (repeat-check-key last-command-event map)) 515 (repeat--exit)
471 516 (let ((exitfun (set-transient-map map)))
472 ;; Messaging 517 (setq repeat-exit-function exitfun)
473 (unless prefix-arg 518
474 (funcall repeat-echo-function map)) 519 (let* ((prop (repeat--command-property 'repeat-exit-timeout))
475 520 (timeout (unless (eq prop 'no) (or prop repeat-exit-timeout))))
476 ;; Adding an exit key 521 (when timeout
477 (when repeat-exit-key 522 (setq repeat-exit-timer
478 (define-key map (if (key-valid-p repeat-exit-key) 523 (run-with-idle-timer timeout nil #'repeat-exit)))))))
479 (kbd repeat-exit-key)
480 repeat-exit-key)
481 'ignore))
482
483 (when (and repeat-keep-prefix (not prefix-arg))
484 (setq prefix-arg current-prefix-arg))
485
486 (setq repeat-in-progress t)
487 (let ((exitfun (set-transient-map map)))
488 (repeat--exit)
489 (setq repeat-exit-function exitfun)
490
491 (let* ((prop (repeat--command-property 'repeat-exit-timeout))
492 (timeout (unless (eq prop 'no) (or prop repeat-exit-timeout))))
493 (when timeout
494 (setq repeat-exit-timer
495 (run-with-idle-timer timeout nil #'repeat-exit))))))))))
496 524
497 (setq repeat-map nil) 525 (setq repeat-map nil)
498 (setq repeat--prev-mb (cons (minibuffer-depth) current-minibuffer-command)) 526 (setq repeat--prev-mb (cons (minibuffer-depth) current-minibuffer-command))
@@ -582,6 +610,7 @@ Used in `repeat-mode'."
582 (push s (alist-get (get s 'repeat-map) keymaps))))) 610 (push s (alist-get (get s 'repeat-map) keymaps)))))
583 (with-help-window (help-buffer) 611 (with-help-window (help-buffer)
584 (with-current-buffer standard-output 612 (with-current-buffer standard-output
613 (setq-local outline-regexp "[*]+")
585 (insert "A list of keymaps used by commands with the symbol property `repeat-map'.\n") 614 (insert "A list of keymaps used by commands with the symbol property `repeat-map'.\n")
586 615
587 (dolist (keymap (sort keymaps (lambda (a b) 616 (dolist (keymap (sort keymaps (lambda (a b)
diff --git a/lisp/server.el b/lisp/server.el
index 8f4ca4cbc6c..8bd622346e7 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1502,7 +1502,7 @@ so don't mark these buffers specially, just visit them normally."
1502 minibuffer-auto-raise)) 1502 minibuffer-auto-raise))
1503 (filen (car file)) 1503 (filen (car file))
1504 (obuf (get-file-buffer filen))) 1504 (obuf (get-file-buffer filen)))
1505 (add-to-history 'file-name-history filen) 1505 (file-name-history--add filen)
1506 (if (null obuf) 1506 (if (null obuf)
1507 (progn 1507 (progn
1508 (run-hooks 'pre-command-hook) 1508 (run-hooks 'pre-command-hook)
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 25ea07e9db7..9bc6ad9db46 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2268,10 +2268,11 @@ Highlighting those lines can be distracting.)"
2268 (save-excursion (goto-char whitespace-point) 2268 (save-excursion (goto-char whitespace-point)
2269 (line-beginning-position))))) 2269 (line-beginning-position)))))
2270 (when (= p 1) 2270 (when (= p 1)
2271 ;; See the comment in `whitespace--update-bob-eob' for why this 2271 (with-silent-modifications
2272 ;; text property is added here. 2272 ;; See the comment in `whitespace--update-bob-eob' for why
2273 (put-text-property 1 whitespace-bob-marker 2273 ;; this text property is added here.
2274 'font-lock-multiline t)) 2274 (put-text-property 1 whitespace-bob-marker
2275 'font-lock-multiline t)))
2275 (when (< p e) 2276 (when (< p e)
2276 (set-match-data (list p e)) 2277 (set-match-data (list p e))
2277 (goto-char e)))) 2278 (goto-char e))))
@@ -2292,10 +2293,11 @@ about to start typing, and if they do, that line and previous
2292empty lines will no longer be EoB empty lines. Highlighting 2293empty lines will no longer be EoB empty lines. Highlighting
2293those lines can be distracting.)" 2294those lines can be distracting.)"
2294 (when (= limit (1+ (buffer-size))) 2295 (when (= limit (1+ (buffer-size)))
2295 ;; See the comment in `whitespace--update-bob-eob' for why this 2296 (with-silent-modifications
2296 ;; text property is added here. 2297 ;; See the comment in `whitespace--update-bob-eob' for why this
2297 (put-text-property whitespace-eob-marker limit 2298 ;; text property is added here.
2298 'font-lock-multiline t)) 2299 (put-text-property whitespace-eob-marker limit
2300 'font-lock-multiline t)))
2299 (let ((b (max (point) whitespace-eob-marker 2301 (let ((b (max (point) whitespace-eob-marker
2300 whitespace-bob-marker ; See comment in the bob func. 2302 whitespace-bob-marker ; See comment in the bob func.
2301 (save-excursion (goto-char whitespace-point) 2303 (save-excursion (goto-char whitespace-point)
@@ -2437,8 +2439,9 @@ purposes)."
2437 (save-match-data 2439 (save-match-data
2438 (when (looking-at whitespace-empty-at-bob-regexp) 2440 (when (looking-at whitespace-empty-at-bob-regexp)
2439 (set-marker whitespace-bob-marker (match-end 1)) 2441 (set-marker whitespace-bob-marker (match-end 1))
2440 (put-text-property (match-beginning 1) (match-end 1) 2442 (with-silent-modifications
2441 'font-lock-multiline t)))) 2443 (put-text-property (match-beginning 1) (match-end 1)
2444 'font-lock-multiline t)))))
2442 (when (or (null end) 2445 (when (or (null end)
2443 (>= end (save-excursion 2446 (>= end (save-excursion
2444 (goto-char whitespace-eob-marker) 2447 (goto-char whitespace-eob-marker)
@@ -2451,8 +2454,9 @@ purposes)."
2451 (when (whitespace--looking-back 2454 (when (whitespace--looking-back
2452 whitespace-empty-at-eob-regexp) 2455 whitespace-empty-at-eob-regexp)
2453 (set-marker whitespace-eob-marker (match-beginning 1)) 2456 (set-marker whitespace-eob-marker (match-beginning 1))
2454 (put-text-property (match-beginning 1) (match-end 1) 2457 (with-silent-modifications
2455 'font-lock-multiline t))))))))) 2458 (put-text-property (match-beginning 1) (match-end 1)
2459 'font-lock-multiline t))))))))))
2456 2460
2457 2461
2458;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2462;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;