Use delete-char instead of backward-delete-char
* lisp/bs.el (bs-delete): * lisp/dired-aux.el (dired-show-file-type): * lisp/emulation/viper-cmd.el (viper-insert-prev-from-insertion-ring): * lisp/man.el (Man-fontify-manpage, Man-cleanup-manpage): * lisp/net/mailcap.el (mailcap-parse-mailcap): * lisp/progmodes/antlr-mode.el (antlr-insert-makefile-rules): * lisp/textmodes/reftex-ref.el (reftex-reference): * lisp/vc/emerge.el: * lisp/woman.el (woman-man-buffer): * test/src/fns-tests.el (fns-tests-hash-buffer): Replace some calls to backward-delete-char with delete-char (negating the argument) since the former is intended for interactive use. This silences most of the interactive-only warnings.
This commit is contained in:
parent
c94011ed56
commit
37e5d0cd85
10 changed files with 19 additions and 19 deletions
|
@ -933,7 +933,7 @@ WHAT is a value of nil, `never', or `always'."
|
|||
(end-of-line)
|
||||
(if (eobp) (point) (1+ (point)))))
|
||||
(when (eobp)
|
||||
(backward-delete-char 1)
|
||||
(delete-char -1)
|
||||
(beginning-of-line)
|
||||
(recenter -1))
|
||||
(bs--set-window-height)))
|
||||
|
|
|
@ -3730,7 +3730,7 @@ of the target of the link instead."
|
|||
(process-file "file" nil t t "-L" "--" file)
|
||||
(process-file "file" nil t t "--" file))
|
||||
(when (bolp)
|
||||
(backward-delete-char 1))
|
||||
(delete-char -1))
|
||||
(message "%s" (buffer-string)))))
|
||||
|
||||
|
||||
|
|
|
@ -1711,8 +1711,8 @@ to in the global map, instead of cycling through the insertion ring."
|
|||
(if (eq viper-current-state 'replace-state)
|
||||
(undo 1)
|
||||
(if viper-last-inserted-string-from-insertion-ring
|
||||
(backward-delete-char
|
||||
(length viper-last-inserted-string-from-insertion-ring))))
|
||||
(delete-char
|
||||
(- (length viper-last-inserted-string-from-insertion-ring)))))
|
||||
)
|
||||
;;first search through insertion history
|
||||
(setq viper-temp-insertion-ring (ring-copy viper-insertion-ring)))
|
||||
|
|
16
lisp/man.el
16
lisp/man.el
|
@ -1262,21 +1262,21 @@ Same for the ANSI bold and normal escape sequences."
|
|||
(progn
|
||||
(goto-char (point-min))
|
||||
(while (and (search-forward "__\b\b" nil t) (not (eobp)))
|
||||
(backward-delete-char 4)
|
||||
(delete-char -4)
|
||||
(put-text-property (point) (1+ (point))
|
||||
'font-lock-face 'Man-underline))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "\b\b__" nil t)
|
||||
(backward-delete-char 4)
|
||||
(delete-char -4)
|
||||
(put-text-property (1- (point)) (point)
|
||||
'font-lock-face 'Man-underline))))
|
||||
(goto-char (point-min))
|
||||
(while (and (search-forward "_\b" nil t) (not (eobp)))
|
||||
(backward-delete-char 2)
|
||||
(delete-char -2)
|
||||
(put-text-property (point) (1+ (point)) 'font-lock-face 'Man-underline))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "\b_" nil t)
|
||||
(backward-delete-char 2)
|
||||
(delete-char -2)
|
||||
(put-text-property (1- (point)) (point) 'font-lock-face 'Man-underline))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\(.\\)\\(\b+\\1\\)+" nil t)
|
||||
|
@ -1294,7 +1294,7 @@ Same for the ANSI bold and normal escape sequences."
|
|||
;; condense it to a shorter line interspersed with ^H. Remove ^H with
|
||||
;; their preceding chars (but don't put Man-overstrike). (Bug#5566)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward ".\b" nil t) (backward-delete-char 2))
|
||||
(while (re-search-forward ".\b" nil t) (delete-char -2))
|
||||
(goto-char (point-min))
|
||||
;; Try to recognize common forms of cross references.
|
||||
(Man-highlight-references)
|
||||
|
@ -1375,9 +1375,9 @@ script would have done them."
|
|||
(if (or interactive (not Man-sed-script))
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "_\b" nil t) (backward-delete-char 2))
|
||||
(while (search-forward "_\b" nil t) (delete-char -2))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "\b_" nil t) (backward-delete-char 2))
|
||||
(while (search-forward "\b_" nil t) (delete-char -2))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\(.\\)\\(\b\\1\\)+" nil t)
|
||||
(replace-match "\\1"))
|
||||
|
@ -1392,7 +1392,7 @@ script would have done them."
|
|||
;; condense it to a shorter line interspersed with ^H. Remove ^H with
|
||||
;; their preceding chars (but don't put Man-overstrike). (Bug#5566)
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward ".\b" nil t) (backward-delete-char 2))
|
||||
(while (re-search-forward ".\b" nil t) (delete-char -2))
|
||||
(Man-softhyphen-to-minus))
|
||||
|
||||
(defun Man-bgproc-filter (process string)
|
||||
|
|
|
@ -510,7 +510,7 @@ If SOURCE, mark the entry with this as the source."
|
|||
(skip-chars-forward "^;\n")
|
||||
;; skip \;
|
||||
(while (eq (char-before) ?\\)
|
||||
(backward-delete-char 1)
|
||||
(delete-char -1)
|
||||
(forward-char)
|
||||
(skip-chars-forward "^;\n"))
|
||||
(if (eq (or (char-after save-pos) 0) ?')
|
||||
|
|
|
@ -2147,7 +2147,7 @@ command `antlr-show-makefile-rules' for detail."
|
|||
(antlr-makefile-insert-variable i " $(" ")"))
|
||||
(insert "\n" (car antlr-makefile-specification))))
|
||||
(if (string-equal (car antlr-makefile-specification) "\n")
|
||||
(backward-delete-char 1))
|
||||
(delete-char -1))
|
||||
(when with-error
|
||||
(goto-char (point-min))
|
||||
(insert antlr-help-unknown-file-text))
|
||||
|
|
|
@ -495,7 +495,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
|
|||
sep1 (cdr (assoc sep reftex-multiref-punctuation))
|
||||
labels (cdr labels))
|
||||
(when cut
|
||||
(backward-delete-char cut)
|
||||
(delete-char (- cut))
|
||||
(setq cut nil))
|
||||
|
||||
;; remove ~ if we do already have a space
|
||||
|
|
|
@ -1299,7 +1299,7 @@ Otherwise, the A or B file present is copied to the output file."
|
|||
(setq ancestor-dir-files (cdr ancestor-dir-files))))
|
||||
(if output-dir
|
||||
(insert "output=" output-dir f "\t"))
|
||||
(backward-delete-char 1)
|
||||
(delete-char -1)
|
||||
(insert "\n")))))
|
||||
|
||||
;;; Common setup routines
|
||||
|
|
|
@ -1690,11 +1690,11 @@ Do not call directly!"
|
|||
(progn
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "__\b\b" nil t)
|
||||
(backward-delete-char 4)
|
||||
(delete-char -4)
|
||||
(woman-set-face (point) (1+ (point)) 'woman-italic))
|
||||
(goto-char (point-min))
|
||||
(while (search-forward "\b\b__" nil t)
|
||||
(backward-delete-char 4)
|
||||
(delete-char -4)
|
||||
(woman-set-face (1- (point)) (point) 'woman-italic))))
|
||||
|
||||
;; Interpret overprinting to indicate bold face:
|
||||
|
|
|
@ -622,7 +622,7 @@
|
|||
(insert "foo")
|
||||
(goto-char 2)
|
||||
(insert " ")
|
||||
(backward-delete-char 1)
|
||||
(delete-char -1)
|
||||
(buffer-hash))
|
||||
(sha1 "foo"))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue