Commit 0b1596c6 authored by Juanma Barranquero's avatar Juanma Barranquero

lisp/simple.el: Avoid warning about `delete-backward-char'.

parent 247c22e1
2011-03-22 Juanma Barranquero <lekktu@gmail.com> 2011-03-22 Juanma Barranquero <lekktu@gmail.com>
* simple.el (backward-delete-char-untabify):
Avoid warning about using `delete-backward-char'.
* image.el (image-type-file-name-regexps): Make it variable. * image.el (image-type-file-name-regexps): Make it variable.
`imagemagick-register-types' modifies it, and the user may want `imagemagick-register-types' modifies it, and the user may want
to add new extensions for known image types. to add new extensions for known image types.
......
...@@ -3392,16 +3392,16 @@ and KILLP is t if a prefix arg was specified." ...@@ -3392,16 +3392,16 @@ and KILLP is t if a prefix arg was specified."
(delete-char 1))) (delete-char 1)))
(forward-char -1) (forward-char -1)
(setq count (1- count)))))) (setq count (1- count))))))
(delete-backward-char (let* ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t")
(let ((skip (cond ((eq backward-delete-char-untabify-method 'hungry) " \t")
((eq backward-delete-char-untabify-method 'all) ((eq backward-delete-char-untabify-method 'all)
" \t\n\r")))) " \t\n\r")))
(if skip (n (if skip
(let ((wh (- (point) (save-excursion (skip-chars-backward skip) (let ((wh (- (point) (save-excursion (skip-chars-backward skip)
(point))))) (point)))))
(+ arg (if (zerop wh) 0 (1- wh)))) (+ arg (if (zerop wh) 0 (1- wh))))
arg)) arg)))
killp)) ;; Avoid warning about delete-backward-char
(with-no-warnings (delete-backward-char n killp))))
(defun zap-to-char (arg char) (defun zap-to-char (arg char)
"Kill up to and including ARGth occurrence of CHAR. "Kill up to and including ARGth occurrence of CHAR.
......
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