Commit d355a0b7 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

Replace Lisp calls to delete-backward-char by delete-char.

* bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el,
skeleton.el, term.el, time.el, wid-edit.el, woman.el,
calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el,
calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el,
emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el,
eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el,
gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el,
language/ethio-util.el, mh-e/mh-alias.el, mh-e/mh-search.el,
net/imap.el, net/rcirc.el, obsolete/complete.el, play/decipher.el,
progmodes/ada-mode.el, progmodes/cc-awk.el, progmodes/dcl-mode.el,
progmodes/ps-mode.el, progmodes/verilog-mode.el,
progmodes/vhdl-mode.el, textmodes/bibtex.el, textmodes/fill.el,
textmodes/reftex-auc.el, textmodes/rst.el, textmodes/sgml-mode.el,
textmodes/table.el, textmodes/texinfmt.el: Replace Lisp calls to
delete-backward-char by calls to delete-char.
parent f668ef02
...@@ -58,7 +58,7 @@ What is being used depends upon `reftex-plug-into-AUCTeX'." ...@@ -58,7 +58,7 @@ What is being used depends upon `reftex-plug-into-AUCTeX'."
;; Create a new label, with a temporary brace for `reftex-what-macro' ;; Create a new label, with a temporary brace for `reftex-what-macro'
(unwind-protect (unwind-protect
(progn (insert "{") (setq label (or (reftex-label nil t) ""))) (progn (insert "{") (setq label (or (reftex-label nil t) "")))
(delete-backward-char 1))) (delete-char -1)))
((and (not definition) (reftex-plug-flag 2)) ((and (not definition) (reftex-plug-flag 2))
;; Reference a label with RefTeX ;; Reference a label with RefTeX
(setq label (reftex-reference nil t))) (setq label (reftex-reference nil t)))
......
...@@ -1787,7 +1787,7 @@ The TOC is inserted indented at the current column." ...@@ -1787,7 +1787,7 @@ The TOC is inserted indented at the current column."
(delete-region init-point (+ init-point (length initial-indent))) (delete-region init-point (+ init-point (length initial-indent)))
;; Delete the last newline added. ;; Delete the last newline added.
(delete-backward-char 1) (delete-char -1)
))) )))
(defun rst-toc-insert-node (node level indent pfx) (defun rst-toc-insert-node (node level indent pfx)
......
...@@ -526,7 +526,7 @@ Behaves electrically if `sgml-quick-keys' is non-nil." ...@@ -526,7 +526,7 @@ Behaves electrically if `sgml-quick-keys' is non-nil."
(insert-char ?/ 1) (insert-char ?/ 1)
(indent-according-to-mode)) (indent-according-to-mode))
((eq sgml-quick-keys 'close) ((eq sgml-quick-keys 'close)
(delete-backward-char 1) (delete-char -1)
(sgml-close-tag)) (sgml-close-tag))
(t (t
(sgml-slash-matching arg)))) (sgml-slash-matching arg))))
...@@ -583,7 +583,7 @@ encoded keyboard operation." ...@@ -583,7 +583,7 @@ encoded keyboard operation."
(insert ?&) (insert ?&)
(or char (or char
(setq char (read-quoted-char "Enter char or octal number"))) (setq char (read-quoted-char "Enter char or octal number")))
(delete-backward-char 1) (delete-char -1)
(insert char) (insert char)
(undo-boundary) (undo-boundary)
(sgml-namify-char)) (sgml-namify-char))
...@@ -601,7 +601,7 @@ Uses `sgml-char-names'." ...@@ -601,7 +601,7 @@ Uses `sgml-char-names'."
((encode-char char 'ucs))))) ((encode-char char 'ucs)))))
(if (not name) (if (not name)
(error "Don't know the name of `%c'" char) (error "Don't know the name of `%c'" char)
(delete-backward-char 1) (delete-char -1)
(insert (format (if (numberp name) "&#%d;" "&%s;") name))))) (insert (format (if (numberp name) "&#%d;" "&%s;") name)))))
(defun sgml-name-self () (defun sgml-name-self ()
...@@ -707,7 +707,7 @@ If QUIET, do not print a message when there are no attributes for TAG." ...@@ -707,7 +707,7 @@ If QUIET, do not print a message when there are no attributes for TAG."
(sgml-value (assoc (downcase attribute) alist)) (sgml-value (assoc (downcase attribute) alist))
(setq i (1- i)))) (setq i (1- i))))
(if (eq (preceding-char) ?\s) (if (eq (preceding-char) ?\s)
(delete-backward-char 1))) (delete-char -1)))
car))) car)))
(defun sgml-auto-attributes (arg) (defun sgml-auto-attributes (arg)
...@@ -1117,7 +1117,7 @@ See `sgml-tag-alist' for info about attribute rules." ...@@ -1117,7 +1117,7 @@ See `sgml-tag-alist' for info about attribute rules."
(setq alist (skeleton-read '(completing-read "Value: " (cdr alist)))) (setq alist (skeleton-read '(completing-read "Value: " (cdr alist))))
(if (string< "" alist) (if (string< "" alist)
(insert alist ?\") (insert alist ?\")
(delete-backward-char 2))) (delete-char -2)))
(insert "=\"") (insert "=\"")
(if (cdr alist) (if (cdr alist)
(insert (skeleton-read '(completing-read "Value: " alist))) (insert (skeleton-read '(completing-read "Value: " alist)))
......
...@@ -919,12 +919,12 @@ This is always set to nil at the entry to `table-with-cache-buffer' before execu ...@@ -919,12 +919,12 @@ This is always set to nil at the entry to `table-with-cache-buffer' before execu
(defvar table-source-info-plist nil (defvar table-source-info-plist nil
"General storage for temporary information used while generating source.") "General storage for temporary information used while generating source.")
;;; The following history containers not only keep the history of user ;; The following history containers not only keep the history of user
;;; entries but also serve as the default value providers. When an ;; entries but also serve as the default value providers. When an
;;; interactive command is invoked it offers a user the latest entry ;; interactive command is invoked it offers a user the latest entry
;;; of the history as a default selection. Therefore the values below ;; of the history as a default selection. Therefore the values below
;;; are the first default value when a command is invoked for the very ;; are the first default value when a command is invoked for the very
;;; first time when there is no real history existing yet. ;; first time when there is no real history existing yet.
(defvar table-cell-span-direction-history '("right")) (defvar table-cell-span-direction-history '("right"))
(defvar table-cell-split-orientation-history '("horizontally")) (defvar table-cell-split-orientation-history '("horizontally"))
(defvar table-cell-split-contents-to-history '("split")) (defvar table-cell-split-contents-to-history '("split"))
...@@ -948,19 +948,19 @@ This is always set to nil at the entry to `table-with-cache-buffer' before execu ...@@ -948,19 +948,19 @@ This is always set to nil at the entry to `table-with-cache-buffer' before execu
(defvar table-capture-columns-history '("")) (defvar table-capture-columns-history '(""))
(defvar table-target-history '("cell")) (defvar table-target-history '("cell"))
;;; Some entries in `table-cell-bindings' are duplicated in ;; Some entries in `table-cell-bindings' are duplicated in
;;; `table-command-remap-alist'. There is a good reason for ;; `table-command-remap-alist'. There is a good reason for
;;; this. Common key like return key may be taken by some other ;; this. Common key like return key may be taken by some other
;;; function than normal `newline' function. Thus binding return key ;; function than normal `newline' function. Thus binding return key
;;; directly for `*table--cell-newline' ensures that the correct enter ;; directly for `*table--cell-newline' ensures that the correct enter
;;; operation in a table cell. However ;; operation in a table cell. However
;;; `table-command-remap-alist' has an additional role than ;; `table-command-remap-alist' has an additional role than
;;; replacing commands. It is also used to construct a table command ;; replacing commands. It is also used to construct a table command
;;; list. This list is very important because it is used to check if ;; list. This list is very important because it is used to check if
;;; the previous command was one of them in this list or not. If the ;; the previous command was one of them in this list or not. If the
;;; previous command is found in the list the current command will not ;; previous command is found in the list the current command will not
;;; refill the table cache. If the command were not listed fast ;; refill the table cache. If the command were not listed fast
;;; typing can cause unwanted cache refill. ;; typing can cause unwanted cache refill.
(defconst table-cell-bindings (defconst table-cell-bindings
'(([(control i)] . table-forward-cell) '(([(control i)] . table-forward-cell)
([(control I)] . table-backward-cell) ([(control I)] . table-backward-cell)
......
...@@ -2507,7 +2507,7 @@ For example, @verb\{|@|\} results in @ and ...@@ -2507,7 +2507,7 @@ For example, @verb\{|@|\} results in @ and
(error "Not found: @verb start brace")) (error "Not found: @verb start brace"))
(delete-region texinfo-command-start (+ 2 texinfo-command-end)) (delete-region texinfo-command-start (+ 2 texinfo-command-end))
(search-forward delimiter)) (search-forward delimiter))
(delete-backward-char 1) (delete-char -1)
(unless (looking-at "}") (unless (looking-at "}")
(error "Not found: @verb end brace")) (error "Not found: @verb end brace"))
(delete-char 1)) (delete-char 1))
......
...@@ -524,7 +524,7 @@ See `display-time-world'." ...@@ -524,7 +524,7 @@ See `display-time-world'."
(insert (pop result) (insert (pop result)
(make-string (1+ (- max-width (pop result))) ?\s) (make-string (1+ (- max-width (pop result))) ?\s)
(pop result) "\n"))) (pop result) "\n")))
(delete-backward-char 1))) (delete-char -1)))
;;;###autoload ;;;###autoload
(defun display-time-world () (defun display-time-world ()
......
...@@ -1334,7 +1334,7 @@ Unlike (get-char-property POS 'field), this works with empty fields too." ...@@ -1334,7 +1334,7 @@ Unlike (get-char-property POS 'field), this works with empty fields too."
(goto-char end) (goto-char end)
(while (and (eq (preceding-char) ?\s) (while (and (eq (preceding-char) ?\s)
(> (point) begin)) (> (point) begin))
(delete-backward-char 1))))))) (delete-char -1)))))))
(widget-specify-secret field)) (widget-specify-secret field))
(widget-apply field :notify field)))) (widget-apply field :notify field))))
...@@ -1477,7 +1477,7 @@ If that does not exist, call the value of `widget-complete-field'." ...@@ -1477,7 +1477,7 @@ If that does not exist, call the value of `widget-complete-field'."
;; Parse escapes in format. ;; Parse escapes in format.
(while (re-search-forward "%\\(.\\)" nil t) (while (re-search-forward "%\\(.\\)" nil t)
(let ((escape (char-after (match-beginning 1)))) (let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2) (delete-char -2)
(cond ((eq escape ?%) (cond ((eq escape ?%)
(insert ?%)) (insert ?%))
((eq escape ?\[) ((eq escape ?\[)
...@@ -1510,7 +1510,7 @@ If that does not exist, call the value of `widget-complete-field'." ...@@ -1510,7 +1510,7 @@ If that does not exist, call the value of `widget-complete-field'."
(setq doc-begin (point)) (setq doc-begin (point))
(insert doc) (insert doc)
(while (eq (preceding-char) ?\n) (while (eq (preceding-char) ?\n)
(delete-backward-char 1)) (delete-char -1))
(insert ?\n) (insert ?\n)
(setq doc-end (point))))) (setq doc-end (point)))))
((eq escape ?h) ((eq escape ?h)
...@@ -2258,7 +2258,7 @@ If the item is checked, CHOSEN is a cons whose cdr is the value." ...@@ -2258,7 +2258,7 @@ If the item is checked, CHOSEN is a cons whose cdr is the value."
;; Parse % escapes in format. ;; Parse % escapes in format.
(while (re-search-forward "%\\([bv%]\\)" nil t) (while (re-search-forward "%\\([bv%]\\)" nil t)
(let ((escape (char-after (match-beginning 1)))) (let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2) (delete-char -2)
(cond ((eq escape ?%) (cond ((eq escape ?%)
(insert ?%)) (insert ?%))
((eq escape ?b) ((eq escape ?b)
...@@ -2441,7 +2441,7 @@ Return an alist of (TYPE MATCH)." ...@@ -2441,7 +2441,7 @@ Return an alist of (TYPE MATCH)."
;; Parse % escapes in format. ;; Parse % escapes in format.
(while (re-search-forward "%\\([bv%]\\)" nil t) (while (re-search-forward "%\\([bv%]\\)" nil t)
(let ((escape (char-after (match-beginning 1)))) (let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2) (delete-char -2)
(cond ((eq escape ?%) (cond ((eq escape ?%)
(insert ?%)) (insert ?%))
((eq escape ?b) ((eq escape ?b)
...@@ -2720,7 +2720,7 @@ Return an alist of (TYPE MATCH)." ...@@ -2720,7 +2720,7 @@ Return an alist of (TYPE MATCH)."
;; Parse % escapes in format. ;; Parse % escapes in format.
(while (re-search-forward "%\\(.\\)" nil t) (while (re-search-forward "%\\(.\\)" nil t)
(let ((escape (char-after (match-beginning 1)))) (let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2) (delete-char -2)
(cond ((eq escape ?%) (cond ((eq escape ?%)
(insert ?%)) (insert ?%))
((eq escape ?i) ((eq escape ?i)
......
...@@ -2443,7 +2443,7 @@ Preserves location of `point'." ...@@ -2443,7 +2443,7 @@ Preserves location of `point'."
(while (and (while (and
(<= (setq N (1+ N)) 0) (<= (setq N (1+ N)) 0)
(cond ((memq (preceding-char) '(?\ ?\t)) (cond ((memq (preceding-char) '(?\ ?\t))
(delete-backward-char 1) t) (delete-char -1) t)
((memq (following-char) '(?\ ?\t)) ((memq (following-char) '(?\ ?\t))
(delete-char 1) t) (delete-char 1) t)
(t nil)))) (t nil))))
...@@ -3121,7 +3121,7 @@ If optional arg CONCAT is non-nil then join arguments." ...@@ -3121,7 +3121,7 @@ If optional arg CONCAT is non-nil then join arguments."
(if unquote (delete-char 1) (forward-char)) (if unquote (delete-char 1) (forward-char))
(re-search-forward "\"\\|$")) (re-search-forward "\"\\|$"))
(if (eq (preceding-char) ?\") (if (eq (preceding-char) ?\")
(if unquote (delete-backward-char 1)) (if unquote (delete-char -1))
(WoMan-warn "Unpaired \" in .%s arguments." request))) (WoMan-warn "Unpaired \" in .%s arguments." request)))
;; (re-search-forward "[^\\\n] \\|$") ; inconsistent ;; (re-search-forward "[^\\\n] \\|$") ; inconsistent
(skip-syntax-forward "^ ")) (skip-syntax-forward "^ "))
...@@ -4346,7 +4346,7 @@ The variable `tab-stop-list' is a list whose elements are either left ...@@ -4346,7 +4346,7 @@ The variable `tab-stop-list' is a list whose elements are either left
tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C."
;; Based on tab-to-tab-stop in indent.el. ;; Based on tab-to-tab-stop in indent.el.
;; R & C tabs probably not quite right! ;; R & C tabs probably not quite right!
(delete-backward-char 1) (delete-char -1)
(let ((tabs tab-stop-list)) (let ((tabs tab-stop-list))
(while (and tabs (>= (current-column) (while (and tabs (>= (current-column)
(woman-get-tab-stop (car tabs)))) (woman-get-tab-stop (car tabs))))
...@@ -4400,7 +4400,7 @@ Needs doing properly!" ...@@ -4400,7 +4400,7 @@ Needs doing properly!"
(delete-char 1) (delete-char 1)
(insert woman-unpadded-space-char) (insert woman-unpadded-space-char)
(goto-char (match-end 0)) (goto-char (match-end 0))
(delete-backward-char 1) (delete-char -1)
(insert-before-markers woman-unpadded-space-char) (insert-before-markers woman-unpadded-space-char)
(subst-char-in-region (subst-char-in-region
(match-beginning 0) (match-end 0) (match-beginning 0) (match-end 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment