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'."
;; Create a new label, with a temporary brace for `reftex-what-macro'
(unwind-protect
(progn (insert "{") (setq label (or (reftex-label nil t) "")))
(delete-backward-char 1)))
(delete-char -1)))
((and (not definition) (reftex-plug-flag 2))
;; Reference a label with RefTeX
(setq label (reftex-reference nil t)))
......
......@@ -1787,7 +1787,7 @@ The TOC is inserted indented at the current column."
(delete-region init-point (+ init-point (length initial-indent)))
;; Delete the last newline added.
(delete-backward-char 1)
(delete-char -1)
)))
(defun rst-toc-insert-node (node level indent pfx)
......
......@@ -526,7 +526,7 @@ Behaves electrically if `sgml-quick-keys' is non-nil."
(insert-char ?/ 1)
(indent-according-to-mode))
((eq sgml-quick-keys 'close)
(delete-backward-char 1)
(delete-char -1)
(sgml-close-tag))
(t
(sgml-slash-matching arg))))
......@@ -583,7 +583,7 @@ encoded keyboard operation."
(insert ?&)
(or char
(setq char (read-quoted-char "Enter char or octal number")))
(delete-backward-char 1)
(delete-char -1)
(insert char)
(undo-boundary)
(sgml-namify-char))
......@@ -601,7 +601,7 @@ Uses `sgml-char-names'."
((encode-char char 'ucs)))))
(if (not name)
(error "Don't know the name of `%c'" char)
(delete-backward-char 1)
(delete-char -1)
(insert (format (if (numberp name) "&#%d;" "&%s;") name)))))
(defun sgml-name-self ()
......@@ -707,7 +707,7 @@ If QUIET, do not print a message when there are no attributes for TAG."
(sgml-value (assoc (downcase attribute) alist))
(setq i (1- i))))
(if (eq (preceding-char) ?\s)
(delete-backward-char 1)))
(delete-char -1)))
car)))
(defun sgml-auto-attributes (arg)
......@@ -1117,7 +1117,7 @@ See `sgml-tag-alist' for info about attribute rules."
(setq alist (skeleton-read '(completing-read "Value: " (cdr alist))))
(if (string< "" alist)
(insert alist ?\")
(delete-backward-char 2)))
(delete-char -2)))
(insert "=\"")
(if (cdr 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
(defvar table-source-info-plist nil
"General storage for temporary information used while generating source.")
;;; The following history containers not only keep the history of user
;;; entries but also serve as the default value providers. When an
;;; interactive command is invoked it offers a user the latest entry
;;; of the history as a default selection. Therefore the values below
;;; are the first default value when a command is invoked for the very
;;; first time when there is no real history existing yet.
;; The following history containers not only keep the history of user
;; entries but also serve as the default value providers. When an
;; interactive command is invoked it offers a user the latest entry
;; of the history as a default selection. Therefore the values below
;; are the first default value when a command is invoked for the very
;; first time when there is no real history existing yet.
(defvar table-cell-span-direction-history '("right"))
(defvar table-cell-split-orientation-history '("horizontally"))
(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
(defvar table-capture-columns-history '(""))
(defvar table-target-history '("cell"))
;;; Some entries in `table-cell-bindings' are duplicated in
;;; `table-command-remap-alist'. There is a good reason for
;;; this. Common key like return key may be taken by some other
;;; function than normal `newline' function. Thus binding return key
;;; directly for `*table--cell-newline' ensures that the correct enter
;;; operation in a table cell. However
;;; `table-command-remap-alist' has an additional role than
;;; replacing commands. It is also used to construct a table command
;;; 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
;;; previous command is found in the list the current command will not
;;; refill the table cache. If the command were not listed fast
;;; typing can cause unwanted cache refill.
;; Some entries in `table-cell-bindings' are duplicated in
;; `table-command-remap-alist'. There is a good reason for
;; this. Common key like return key may be taken by some other
;; function than normal `newline' function. Thus binding return key
;; directly for `*table--cell-newline' ensures that the correct enter
;; operation in a table cell. However
;; `table-command-remap-alist' has an additional role than
;; replacing commands. It is also used to construct a table command
;; 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
;; previous command is found in the list the current command will not
;; refill the table cache. If the command were not listed fast
;; typing can cause unwanted cache refill.
(defconst table-cell-bindings
'(([(control i)] . table-forward-cell)
([(control I)] . table-backward-cell)
......
......@@ -2507,7 +2507,7 @@ For example, @verb\{|@|\} results in @ and
(error "Not found: @verb start brace"))
(delete-region texinfo-command-start (+ 2 texinfo-command-end))
(search-forward delimiter))
(delete-backward-char 1)
(delete-char -1)
(unless (looking-at "}")
(error "Not found: @verb end brace"))
(delete-char 1))
......
......@@ -524,7 +524,7 @@ See `display-time-world'."
(insert (pop result)
(make-string (1+ (- max-width (pop result))) ?\s)
(pop result) "\n")))
(delete-backward-char 1)))
(delete-char -1)))
;;;###autoload
(defun display-time-world ()
......
......@@ -1334,7 +1334,7 @@ Unlike (get-char-property POS 'field), this works with empty fields too."
(goto-char end)
(while (and (eq (preceding-char) ?\s)
(> (point) begin))
(delete-backward-char 1)))))))
(delete-char -1)))))))
(widget-specify-secret field))
(widget-apply field :notify field))))
......@@ -1477,7 +1477,7 @@ If that does not exist, call the value of `widget-complete-field'."
;; Parse escapes in format.
(while (re-search-forward "%\\(.\\)" nil t)
(let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2)
(delete-char -2)
(cond ((eq escape ?%)
(insert ?%))
((eq escape ?\[)
......@@ -1510,7 +1510,7 @@ If that does not exist, call the value of `widget-complete-field'."
(setq doc-begin (point))
(insert doc)
(while (eq (preceding-char) ?\n)
(delete-backward-char 1))
(delete-char -1))
(insert ?\n)
(setq doc-end (point)))))
((eq escape ?h)
......@@ -2258,7 +2258,7 @@ If the item is checked, CHOSEN is a cons whose cdr is the value."
;; Parse % escapes in format.
(while (re-search-forward "%\\([bv%]\\)" nil t)
(let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2)
(delete-char -2)
(cond ((eq escape ?%)
(insert ?%))
((eq escape ?b)
......@@ -2441,7 +2441,7 @@ Return an alist of (TYPE MATCH)."
;; Parse % escapes in format.
(while (re-search-forward "%\\([bv%]\\)" nil t)
(let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2)
(delete-char -2)
(cond ((eq escape ?%)
(insert ?%))
((eq escape ?b)
......@@ -2720,7 +2720,7 @@ Return an alist of (TYPE MATCH)."
;; Parse % escapes in format.
(while (re-search-forward "%\\(.\\)" nil t)
(let ((escape (char-after (match-beginning 1))))
(delete-backward-char 2)
(delete-char -2)
(cond ((eq escape ?%)
(insert ?%))
((eq escape ?i)
......
......@@ -2443,7 +2443,7 @@ Preserves location of `point'."
(while (and
(<= (setq N (1+ N)) 0)
(cond ((memq (preceding-char) '(?\ ?\t))
(delete-backward-char 1) t)
(delete-char -1) t)
((memq (following-char) '(?\ ?\t))
(delete-char 1) t)
(t nil))))
......@@ -3121,7 +3121,7 @@ If optional arg CONCAT is non-nil then join arguments."
(if unquote (delete-char 1) (forward-char))
(re-search-forward "\"\\|$"))
(if (eq (preceding-char) ?\")
(if unquote (delete-backward-char 1))
(if unquote (delete-char -1))
(WoMan-warn "Unpaired \" in .%s arguments." request)))
;; (re-search-forward "[^\\\n] \\|$") ; inconsistent
(skip-syntax-forward "^ "))
......@@ -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."
;; Based on tab-to-tab-stop in indent.el.
;; R & C tabs probably not quite right!
(delete-backward-char 1)
(delete-char -1)
(let ((tabs tab-stop-list))
(while (and tabs (>= (current-column)
(woman-get-tab-stop (car tabs))))
......@@ -4400,7 +4400,7 @@ Needs doing properly!"
(delete-char 1)
(insert woman-unpadded-space-char)
(goto-char (match-end 0))
(delete-backward-char 1)
(delete-char -1)
(insert-before-markers woman-unpadded-space-char)
(subst-char-in-region
(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