Browse Source

Use `delete-char' instead of `delete-backward-char'

* org.el (org-self-insert-command): Use `delete-char' instead of
  `delete-backward-char'.
* org-table.el (orgtbl-self-insert-command): Dto.

According to the doc string `delete-backward-char' "is meant for
interactive use only; from Lisp, better use `delete-char' with a
negated argument."
David Maus 7 years ago
parent
commit
00040e708c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lisp/org-table.el
  2. 1 1
      lisp/org.el

+ 1 - 1
lisp/org-table.el

@@ -4030,7 +4030,7 @@ overwritten, and the table is not marked as requiring realignment."
 	   (looking-at "[^|\n]*  +|"))
       (let (org-table-may-need-update)
 	(goto-char (1- (match-end 0)))
-	(delete-backward-char 1)
+	(delete-char -1)
 	(goto-char (match-beginning 0))
 	(self-insert-command N))
     (setq org-table-may-need-update t)

+ 1 - 1
lisp/org.el

@@ -16921,7 +16921,7 @@ overwritten, and the table is not marked as requiring realignment."
      (looking-at "[^|\n]*  |"))
     (let (org-table-may-need-update)
       (goto-char (1- (match-end 0)))
-      (delete-backward-char 1)
+      (delete-char -1)
       (goto-char (match-beginning 0))
       (self-insert-command N)))
    (t