Merge branch 'bugfix'

This commit is contained in:
Ihor Radchenko 2024-04-15 14:19:50 +03:00
commit 1ae978f940
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 14 additions and 8 deletions

View File

@ -17026,18 +17026,23 @@ either not currently on a tagged headline or on a tag."
(< (point) (match-beginning 1))) (< (point) (match-beginning 1)))
(org-align-tags))) (org-align-tags)))
(defun org--speed-command-p ()
"Return non-nil when current command is a speed command.
Set `org-speed-command' to the appropriate command as a side effect."
(and org-use-speed-commands
(let ((kv (this-command-keys-vector)))
(setq org-speed-command
(run-hook-with-args-until-success
'org-speed-command-hook
(make-string 1 (aref kv (1- (length kv)))))))))
(defun org-self-insert-command (N) (defun org-self-insert-command (N)
"Like `self-insert-command', use overwrite-mode for whitespace in tables. "Like `self-insert-command', use overwrite-mode for whitespace in tables.
If the cursor is in a table looking at whitespace, the whitespace is If the cursor is in a table looking at whitespace, the whitespace is
overwritten, and the table is not marked as requiring realignment." overwritten, and the table is not marked as requiring realignment."
(interactive "p") (interactive "p")
(cond (cond
((and org-use-speed-commands ((org--speed-command-p)
(let ((kv (this-command-keys-vector)))
(setq org-speed-command
(run-hook-with-args-until-success
'org-speed-command-hook
(make-string 1 (aref kv (1- (length kv))))))))
(cond (cond
((commandp org-speed-command) ((commandp org-speed-command)
(setq this-command org-speed-command) (setq this-command org-speed-command)
@ -17149,8 +17154,9 @@ because, in this case the deletion might narrow the column."
;; Make `delete-selection-mode' work with Org mode and Orgtbl mode ;; Make `delete-selection-mode' work with Org mode and Orgtbl mode
(put 'org-self-insert-command 'delete-selection (put 'org-self-insert-command 'delete-selection
(lambda () (lambda ()
(not (run-hook-with-args-until-success (unless (org--speed-command-p)
'self-insert-uses-region-functions)))) (not (run-hook-with-args-until-success
'self-insert-uses-region-functions)))))
(put 'orgtbl-self-insert-command 'delete-selection (put 'orgtbl-self-insert-command 'delete-selection
(lambda () (lambda ()
(not (run-hook-with-args-until-success (not (run-hook-with-args-until-success