# HG changeset patch # User Stefan Monnier # Date 1274753468 14400 # Node ID d835100c3e8b2793f8b562f8af6e23287cecf932 # Parent 9ad1ee311b5e4a229e009121586cf39e3ff815e6 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. diff -r 9ad1ee311b5e -r d835100c3e8b lisp/ChangeLog --- a/lisp/ChangeLog Tue May 25 10:26:03 2010 +0900 +++ b/lisp/ChangeLog Mon May 24 22:11:08 2010 -0400 @@ -1,3 +1,22 @@ +2010-05-25 Stefan Monnier + + 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. + 2010-05-25 Kenichi Handa * language/hebrew.el (hebrew-shape-gstring): New function. diff -r 9ad1ee311b5e -r d835100c3e8b lisp/bs.el --- a/lisp/bs.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/bs.el Mon May 24 22:11:08 2010 -0400 @@ -1152,7 +1152,7 @@ (dolist (buffer list) (bs--insert-one-entry buffer) (insert "\n")) - (delete-backward-char 1) + (delete-char -1) (bs--set-window-height) (bs--goto-current-buffer) (font-lock-fontify-buffer) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/calc/calc-graph.el --- a/lisp/calc/calc-graph.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/calc/calc-graph.el Mon May 24 22:11:08 2010 -0400 @@ -433,7 +433,7 @@ (while (memq (preceding-char) '(?\s ?\t)) (forward-char -1)) (if (eq (preceding-char) ?\,) - (delete-backward-char 1)))) + (delete-char -1)))) (with-current-buffer calcbuf (setq cache-env (list calc-angle-mode calc-complex-mode diff -r 9ad1ee311b5e -r d835100c3e8b lisp/calc/calc-help.el --- a/lisp/calc/calc-help.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/calc/calc-help.el Mon May 24 22:11:08 2010 -0400 @@ -128,7 +128,7 @@ (dig2 (char-after (match-beginning 3)))) (delete-region (match-end 1) (match-end 0)) (goto-char (match-beginning 1)) - (delete-backward-char 1) + (delete-char -1) (delete-char 5) (insert (format "%c .. %c" (min dig1 dig2) (max dig1 dig2))))) (goto-char (point-min))))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/calc/calc-incom.el --- a/lisp/calc/calc-incom.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/calc/calc-incom.el Mon May 24 22:11:08 2010 -0400 @@ -176,9 +176,9 @@ (defun calc-digit-dots () (if (eq calc-prev-char ?.) (progn - (delete-backward-char 1) + (delete-char -1) (if (calc-minibuffer-contains ".*\\.\\'") - (delete-backward-char 1)) + (delete-char -1)) (setq calc-prev-char 'dots last-command-event 32) (if calc-prev-prev-char @@ -188,7 +188,7 @@ (erase-buffer)) (exit-minibuffer))) ;; just ignore extra decimal point, anticipating ".." - (delete-backward-char 1))) + (delete-char -1))) (defun calc-dots () (interactive) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/calc/calc.el --- a/lisp/calc/calc.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/calc/calc.el Mon May 24 22:11:08 2010 -0400 @@ -2386,7 +2386,7 @@ (progn (require 'calc-ext) (calc-digit-dots)) - (delete-backward-char 1) + (delete-char -1) (beep) (calc-temp-minibuffer-message " [Bad format]")))))) (setq calc-prev-prev-char calc-prev-char diff -r 9ad1ee311b5e -r d835100c3e8b lisp/emacs-lisp/cl-extra.el --- a/lisp/emacs-lisp/cl-extra.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/emacs-lisp/cl-extra.el Mon May 24 22:11:08 2010 -0400 @@ -685,7 +685,7 @@ (setq last (point)) (goto-char (1+ pt)) (while (search-forward "(quote " last t) - (delete-backward-char 7) + (delete-char -7) (insert "'") (forward-sexp) (delete-char 1)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/emacs-lisp/cl-loaddefs.el --- a/lisp/emacs-lisp/cl-loaddefs.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/emacs-lisp/cl-loaddefs.el Mon May 24 22:11:08 2010 -0400 @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "d93072a26c59f663a92b10df8bc28187") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "deb3495d75c36a222e5238eadb8e347c") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ diff -r 9ad1ee311b5e -r d835100c3e8b lisp/emulation/cua-rect.el --- a/lisp/emulation/cua-rect.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/emulation/cua-rect.el Mon May 24 22:11:08 2010 -0400 @@ -1344,7 +1344,7 @@ pad) (if (bolp) nil - (delete-backward-char 1) + (delete-char -1) (if (cua--rectangle-right-side t) (cua--rectangle-insert-col (current-column)) (setq indent (- l (current-column)))))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/emulation/viper-ex.el --- a/lisp/emulation/viper-ex.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/emulation/viper-ex.el Mon May 24 22:11:08 2010 -0400 @@ -750,7 +750,7 @@ (format "[^\\\\]\\(\\\\\\\\\\)*\\\\%c" c))) (setq cont nil) ;; we are at an escaped delimiter: unescape it and continue - (delete-backward-char 2) + (delete-char -2) (insert c) (if (eolp) ;; if at eol, exit loop and go to next line diff -r 9ad1ee311b5e -r d835100c3e8b lisp/eshell/esh-test.el --- a/lisp/eshell/esh-test.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/eshell/esh-test.el Mon May 24 22:11:08 2010 -0400 @@ -101,7 +101,7 @@ (eshell-redisplay)) (let ((truth (eval command))) (with-current-buffer test-buffer - (delete-backward-char 6) + (delete-char -6) (insert-before-markers "[" (let (str) (if truth diff -r 9ad1ee311b5e -r d835100c3e8b lisp/eshell/eshell.el --- a/lisp/eshell/eshell.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/eshell/eshell.el Mon May 24 22:11:08 2010 -0400 @@ -404,7 +404,7 @@ (assert (not (eshell-interactive-process))) (goto-char (point-max)) (while (and (bolp) (not (bobp))) - (delete-backward-char 1))) + (delete-char -1))) (assert (and buf (buffer-live-p buf))) (unless arg (let ((len (if (not intr) 2 diff -r 9ad1ee311b5e -r d835100c3e8b lisp/expand.el --- a/lisp/expand.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/expand.el Mon May 24 22:11:08 2010 -0400 @@ -368,7 +368,7 @@ nil)) (defun expand-do-expansion () - (delete-backward-char (length last-abbrev-text)) + (delete-char (- (length last-abbrev-text))) (let* ((vect (symbol-value last-abbrev)) (text (aref vect 0)) (position (aref vect 1)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/gnus/gnus-uu.el --- a/lisp/gnus/gnus-uu.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/gnus/gnus-uu.el Mon May 24 22:11:08 2010 -0400 @@ -1488,7 +1488,7 @@ (when gnus-uu-kill-carriage-return (save-excursion (while (search-forward "\r" nil t) - (delete-backward-char 1)))) + (delete-char -1)))) (while (or (re-search-forward gnus-uu-begin-string nil t) (re-search-forward gnus-uu-body-line nil t)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/gnus/nndoc.el --- a/lisp/gnus/nndoc.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/gnus/nndoc.el Mon May 24 22:11:08 2010 -0400 @@ -741,7 +741,7 @@ (setq p (1+ (nth 3 blk))))) (goto-char begin) (while (re-search-forward "\r$" nil t) - (delete-backward-char 1)) + (delete-char -1)) (when head (goto-char begin) (when (search-forward "\n\n" nil t) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/gnus/nnrss.el --- a/lisp/gnus/nnrss.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/gnus/nnrss.el Mon May 24 22:11:08 2010 -0400 @@ -682,7 +682,7 @@ (rfc2047-encode-region (point-min) (point-max))) (goto-char (point-min)) (while (search-forward "\n" nil t) - (delete-backward-char 1)) + (delete-char -1)) (buffer-string))) ;;; Snarf functions diff -r 9ad1ee311b5e -r d835100c3e8b lisp/gnus/rfc2047.el --- a/lisp/gnus/rfc2047.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/gnus/rfc2047.el Mon May 24 22:11:08 2010 -0400 @@ -427,7 +427,7 @@ ;; since encoded words can't occur in quotes. (progn (goto-char end) - (delete-backward-char 1) + (delete-char -1) (goto-char start) (delete-char 1) (when last-encoded @@ -897,7 +897,7 @@ (goto-char beg) (while (search-forward "\\" nil 'move) (unless (memq (char-after) '(?\")) - (delete-backward-char 1)) + (delete-char -1)) (forward-char))) (forward-char)) (error diff -r 9ad1ee311b5e -r d835100c3e8b lisp/gnus/utf7.el --- a/lisp/gnus/utf7.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/gnus/utf7.el Mon May 24 22:11:08 2010 -0400 @@ -112,7 +112,7 @@ (skip-chars-forward not-direct-encoding-chars))) (if (and (= fc esc-char) (= run-length 1)) ; Lone esc-char? - (delete-backward-char 1) ; Now there's one too many + (delete-char -1) ; Now there's one too many (utf7-fragment-encode p (point) for-imap)) (insert "-"))))))) @@ -153,7 +153,7 @@ (save-excursion (utf7-fragment-decode p (point) for-imap) (goto-char p) - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun utf7-fragment-decode (start end &optional for-imap) "Decode base64 encoded fragment from START to END of UTF-7 text in buffer. diff -r 9ad1ee311b5e -r d835100c3e8b lisp/ido.el --- a/lisp/ido.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/ido.el Mon May 24 22:11:08 2010 -0400 @@ -2815,7 +2815,7 @@ ((eq this-original-command 'viper-del-backward-char-in-insert) (funcall this-original-command)) (t - (delete-backward-char (prefix-numeric-value count))))) + (delete-char (- (prefix-numeric-value count)))))) (defun ido-delete-backward-word-updir (count) "Delete all chars backwards, or at beginning of buffer, go up one level." diff -r 9ad1ee311b5e -r d835100c3e8b lisp/image-dired.el --- a/lisp/image-dired.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/image-dired.el Mon May 24 22:11:08 2010 -0400 @@ -937,7 +937,7 @@ ;; If on empty line at end of buffer (when (and (eobp) (looking-at "^$")) - (delete-backward-char 1)))))) + (delete-char -1)))))) files) (save-buffer) (kill-buffer buf)))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/international/utf-7.el --- a/lisp/international/utf-7.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/international/utf-7.el Mon May 24 22:11:08 2010 -0400 @@ -62,7 +62,7 @@ (decode-coding-region p (point) 'utf-16be) (save-excursion (goto-char p) - (delete-backward-char 1))))))) + (delete-char -1))))))) (- (point-max) (point-min))))) ;;;###autoload diff -r 9ad1ee311b5e -r d835100c3e8b lisp/language/ethio-util.el --- a/lisp/language/ethio-util.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/language/ethio-util.el Mon May 24 22:11:08 2010 -0400 @@ -869,7 +869,7 @@ (goto-char (point-min)) (while (re-search-forward "[ሀ-፼]" nil t) (setq ucode (preceding-char)) - (delete-backward-char 1) + (delete-char -1) (insert (format (if ethio-java-save-lowercase "\\u%4x" "\\u%4X") ucode))))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/lpr.el --- a/lisp/lpr.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/lpr.el Mon May 24 22:11:08 2010 -0400 @@ -291,7 +291,7 @@ (let (c) (while (re-search-forward "[\^@-\^h\^k\^n-\^_\177-\377]" nil t) (setq c (preceding-char)) - (delete-backward-char 1) + (delete-char -1) (insert (if (< c ?\s) (format "\\^%c" (+ c ?@)) (format "\\%02x" c)))))))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/mh-e/mh-alias.el --- a/lisp/mh-e/mh-alias.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/mh-e/mh-alias.el Mon May 24 22:11:08 2010 -0400 @@ -234,7 +234,7 @@ (let ((user-arg (if user "-user" "-nouser"))) (mh-exec-cmd-quiet t "ali" user-arg "-nolist" alias)) (goto-char (point-max)) - (if (looking-at "^$") (delete-backward-char 1)) + (if (looking-at "^$") (delete-char -1)) (buffer-substring (point-min)(point-max))) (error (progn (message "%s" (error-message-string err)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/mh-e/mh-search.el --- a/lisp/mh-e/mh-search.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/mh-e/mh-search.el Mon May 24 22:11:08 2010 -0400 @@ -1511,7 +1511,7 @@ (delete-char 1)) (goto-char (point-max)) (while (and (not (bobp)) (memq (char-before) '(? ?\t ?\n ?\r ?_))) - (delete-backward-char 1)) + (delete-char -1)) (subst-char-in-region (point-min) (point-max) ? ?_ t) (subst-char-in-region (point-min) (point-max) ?\t ?_ t) (subst-char-in-region (point-min) (point-max) ?\n ?_ t) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/net/imap.el --- a/lisp/net/imap.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/net/imap.el Mon May 24 22:11:08 2010 -0400 @@ -2095,7 +2095,7 @@ (while (setq end (imap-find-next-line)) (save-restriction (narrow-to-region (point-min) end) - (delete-backward-char (length imap-server-eol)) + (delete-char (- (length imap-server-eol))) (goto-char (point-min)) (unwind-protect (cond ((eq imap-state 'initial) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/net/rcirc.el --- a/lisp/net/rcirc.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/net/rcirc.el Mon May 24 22:11:08 2010 -0400 @@ -1067,8 +1067,8 @@ (goto-char (point-max)) (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) ;; delete a trailing newline - (when (eq (point) (point-at-bol)) - (delete-backward-char 1)) + (when (bolp) + (delete-char -1)) (let ((input (buffer-substring-no-properties rcirc-prompt-end-marker (point)))) (dolist (line (split-string input "\n")) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/obsolete/complete.el --- a/lisp/obsolete/complete.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/obsolete/complete.el Mon May 24 22:11:08 2010 -0400 @@ -699,7 +699,7 @@ (if (and (eq mode 'word) (not PC-word-failed-flag)) (let ((PC-word-failed-flag t)) - (delete-backward-char 1) + (delete-char -1) (PC-do-completion 'word)) (when abbreviated (delete-region beg end) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/pcomplete.el --- a/lisp/pcomplete.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/pcomplete.el Mon May 24 22:11:08 2010 -0400 @@ -553,7 +553,7 @@ pcomplete-expand-and-complete pcomplete-reverse))) (progn - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (if (eq this-command 'pcomplete-reverse) (progn (push (car (last pcomplete-current-completions)) @@ -616,7 +616,7 @@ (pcomplete) (when (and pcomplete-current-completions (> (length pcomplete-current-completions) 0)) ;?? - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (while pcomplete-current-completions (unless (pcomplete-insert-entry "" (car pcomplete-current-completions) t @@ -639,7 +639,7 @@ (when (and pcomplete-cycle-completions pcomplete-current-completions (eq last-command 'pcomplete-argument)) - (delete-backward-char pcomplete-last-completion-length) + (delete-char (- pcomplete-last-completion-length)) (setq pcomplete-current-completions nil pcomplete-last-completion-raw nil)) (let ((pcomplete-show-list t)) @@ -1207,7 +1207,7 @@ ;; FIXME: Here we presume that quoting `stub' gives us the exact ;; text in the buffer before point, which is not guaranteed; ;; e.g. it is not the case in eshell when completing ${FOO}tm[TAB]. - (delete-backward-char (length (pcomplete-quote-argument stub))) + (delete-char (- (length (pcomplete-quote-argument stub)))) ;; if there is already a backslash present to handle the first ;; character, don't bother quoting it (when (eq (char-before) ?\\) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/play/decipher.el --- a/lisp/play/decipher.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/play/decipher.el Mon May 24 22:11:08 2010 -0400 @@ -1060,7 +1060,7 @@ ;; (insert ?\() ;; (while (setq undo-map (pop undo-rec)) ;; (insert (cdr undo-map) (car undo-map) ?\ )) -;; (delete-backward-char 1) +;; (delete-char -1) ;; (insert ")\n")))))) ;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9 diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/ada-mode.el --- a/lisp/progmodes/ada-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/ada-mode.el Mon May 24 22:11:08 2010 -0400 @@ -1645,7 +1645,7 @@ (insert " ") (ada-adjust-case) ;; horrible dekludge - (delete-backward-char 1) + (delete-char -1) ;; some special keys and their bindings (cond ((eq lastk ?\n) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/cc-awk.el --- a/lisp/progmodes/cc-awk.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/cc-awk.el Mon May 24 22:11:08 2010 -0400 @@ -244,7 +244,7 @@ ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]") -;;;; NEW VERSION! (which will be restricted to the current line) +;; NEW VERSION! (which will be restricted to the current line) (defconst c-awk-one-line-non-syn-ws*-re (concat "\\([ \t]*" "\\(" c-awk-_-harmless-nonws-char-re "\\|" @@ -503,7 +503,7 @@ (insert-char ?\n 1) ; ...artificial eol is needed for comment detection. (setq extra-nl t)) (prog1 (c-awk-get-NL-prop-prev-line do-lim) - (if extra-nl (delete-backward-char 1)))))) + (if extra-nl (delete-char -1)))))) (defsubst c-awk-prev-line-incomplete-p (&optional do-lim) ;; Is there an incomplete statement at the end of the previous line? @@ -519,14 +519,14 @@ ;; This function might do hidden buffer changes. (memq (c-awk-get-NL-prop-cur-line do-lim) '(?\\ ?\{))) -;;;; NOTES ON "VIRTUAL SEMICOLONS" -;;;; -;;;; A "virtual semicolon" is what terminates a statement when there is no ; -;;;; or } to do the job. Like point, it is considered to lie _between_ two -;;;; characters. As from mid-March 2004, it is considered to lie just after -;;;; the last non-syntactic-whitespace character on the line; (previously, it -;;;; was considered an attribute of the EOL on the line). A real semicolon -;;;; never counts as a virtual one. +;; NOTES ON "VIRTUAL SEMICOLONS" +;; +;; A "virtual semicolon" is what terminates a statement when there is no ; +;; or } to do the job. Like point, it is considered to lie _between_ two +;; characters. As from mid-March 2004, it is considered to lie just after +;; the last non-syntactic-whitespace character on the line; (previously, it +;; was considered an attribute of the EOL on the line). A real semicolon +;; never counts as a virtual one. (defun c-awk-at-vsemi-p (&optional pos) ;; Is there a virtual semicolon at POS (or POINT)? diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/dcl-mode.el --- a/lisp/progmodes/dcl-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/dcl-mode.el Mon May 24 22:11:08 2010 -0400 @@ -1549,13 +1549,11 @@ (interactive "*P") (delete-indentation arg) (let ((type (dcl-get-line-type))) - (if (and (or (equal type '$) - (equal type '-) - (equal type 'empty-$)) + (if (and (member type '($ - empty-$)) (not (bobp)) - (= (char-after (1- (point))) ?-)) + (= (char-before) ?-)) (progn - (delete-backward-char 1) + (delete-char -1) (fixup-whitespace))))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/ps-mode.el --- a/lisp/progmodes/ps-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/ps-mode.el Mon May 24 22:11:08 2010 -0400 @@ -681,7 +681,7 @@ (if (or (not ps-mode-auto-indent) (< ps-mode-tab 1) (not (re-search-backward "^[ \t]+\\=" nil t))) - (delete-backward-char 1) + (call-interactively 'delete-backward-char) (setq target (ps-mode-target-column)) (while (> column target) (setq target (+ target ps-mode-tab))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/verilog-mode.el --- a/lisp/progmodes/verilog-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/verilog-mode.el Mon May 24 22:11:08 2010 -0400 @@ -9305,11 +9305,11 @@ (delete-char 1) (insert ");") (search-forward "\n") ;; Added by inst-port - (delete-backward-char 1) + (delete-char -1) (if (search-forward ")" nil t) ;; From user, moved up a line - (delete-backward-char 1)) + (delete-char -1)) (if (search-forward ";" nil t) ;; Don't error if user had syntax error and forgot it - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun verilog-auto-inst-param () "Expand AUTOINSTPARAM statements, as part of \\[verilog-auto]. @@ -9412,9 +9412,9 @@ (delete-char 1) (insert ")") (search-forward "\n") ;; Added by inst-port - (delete-backward-char 1) + (delete-char -1) (if (search-forward ")" nil t) ;; From user, moved up a line - (delete-backward-char 1))))))))) + (delete-char -1))))))))) (defun verilog-auto-reg () "Expand AUTOREG statements, as part of \\[verilog-auto]. diff -r 9ad1ee311b5e -r d835100c3e8b lisp/progmodes/vhdl-mode.el --- a/lisp/progmodes/vhdl-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/progmodes/vhdl-mode.el Mon May 24 22:11:08 2010 -0400 @@ -7994,7 +7994,7 @@ (condition-case () (forward-sexp) (error (goto-char (point-max)))) (< (point) end)) - (delete-backward-char 1)) + (delete-char -1)) ;; add closing parenthesis (when (> (point) end) (goto-char end) @@ -8105,7 +8105,7 @@ (interactive "p") (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) (if (= (preceding-char) last-input-event) - (progn (delete-backward-char 1) (insert-char ?\" 1)) + (progn (delete-char -1) (insert-char ?\" 1)) (insert-char ?\' 1)) (self-insert-command count))) @@ -8172,7 +8172,7 @@ (unless (vhdl-template-field (concat "[type" (and (vhdl-standard-p 'ams) " or nature") "]") nil t) - (delete-backward-char 3)) + (delete-char -3)) (vhdl-insert-keyword " IS ") (vhdl-template-field "name" ";") (vhdl-comment-insert-inline)))) @@ -8536,7 +8536,7 @@ (vhdl-template-field "library name" "." nil nil nil nil (vhdl-work-library)) (vhdl-template-field "configuration name" ";")) - (t (delete-backward-char 1) (insert ";") t)))))) + (t (delete-char -1) (insert ";") t)))))) (defun vhdl-template-configuration-decl () @@ -8703,7 +8703,7 @@ (vhdl-insert-keyword " OPEN ") (unless (vhdl-template-field "[READ_MODE | WRITE_MODE | APPEND_MODE]" nil t) - (delete-backward-char 6))) + (delete-char -6))) (vhdl-insert-keyword " IS ") (when (vhdl-standard-p '87) (vhdl-template-field "[IN | OUT]" " " t)) @@ -9031,7 +9031,7 @@ (insert "\n") (indent-to margin)) (delete-region end-pos (point)) - (delete-backward-char 1) + (delete-char -1) (insert ")") (when vhdl-auto-align (vhdl-align-region-groups start (point) 1)) t) @@ -9405,7 +9405,7 @@ (vhdl-insert-keyword "REPORT ") (if (equal "\"\"" (vhdl-template-field "string expression" nil t start (point) t)) - (delete-backward-char 2) + (delete-char -2) (setq start (point)) (vhdl-insert-keyword " SEVERITY ") (unless (vhdl-template-field "[NOTE | WARNING | ERROR | FAILURE]" nil t) @@ -9553,7 +9553,7 @@ "[scalar type | ARRAY | RECORD | ACCESS | FILE]" nil t) "")))) (cond ((equal definition "") - (delete-backward-char 4) + (delete-char -4) (insert ";")) ((equal definition "ARRAY") (delete-region (point) (progn (forward-word -1) (point))) @@ -10053,13 +10053,13 @@ (if (not (or (and string (progn (insert string) t)) (vhdl-template-field "[comment]" nil t))) (delete-region position (point)) - (while (= (preceding-char) ? ) (delete-backward-char 1)) -; (when (> (current-column) end-comment-column) -; (setq position (point-marker)) -; (re-search-backward "-- ") -; (insert "\n") -; (indent-to comment-column) -; (goto-char position)) + (while (= (preceding-char) ?\ ) (delete-char -1)) + ;; (when (> (current-column) end-comment-column) + ;; (setq position (point-marker)) + ;; (re-search-backward "-- ") + ;; (insert "\n") + ;; (indent-to comment-column) + ;; (goto-char position)) )))) (defun vhdl-comment-block () @@ -10192,7 +10192,7 @@ (when semicolon-pos (goto-char semicolon-pos)) (if not-empty (progn (delete-char 1) (insert ")")) - (delete-backward-char 2)))) + (delete-char -2)))) (defun vhdl-template-generic-list (optional &optional no-value) "Read from user a generic spec argument list." diff -r 9ad1ee311b5e -r d835100c3e8b lisp/skeleton.el --- a/lisp/skeleton.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/skeleton.el Mon May 24 22:11:08 2010 -0400 @@ -358,7 +358,7 @@ (< element 0)) (if skeleton-untabify (backward-delete-char-untabify (- element)) - (delete-backward-char (- element))) + (delete-char element)) (insert (if (not literal) (funcall skeleton-transformation-function element) element)))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/term.el --- a/lisp/term.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/term.el Mon May 24 22:11:08 2010 -0400 @@ -1170,7 +1170,7 @@ (let* ((str (car cur)) (len (length str)) (start (- (point) len))) (if (and (>= start (point-min)) (string= str (buffer-substring start (point)))) - (progn (delete-backward-char len) + (progn (delete-char (- len)) (setq term-kill-echo-list (cdr cur)) (setq term-current-column nil) (setq term-current-row nil) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/bibtex.el --- a/lisp/textmodes/bibtex.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/bibtex.el Mon May 24 22:11:08 2010 -0400 @@ -2094,7 +2094,7 @@ ;; if match not at left subfield boundary... (if (< (1+ (nth 1 bounds)) (match-beginning 0)) (insert (bibtex-field-right-delimiter) " # ") - (delete-backward-char 1)))))))) + (delete-char -1)))))))) ;; use book title of crossref'd entry (if (and (memq 'inherit-booktitle format) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/fill.el Mon May 24 22:11:08 2010 -0400 @@ -657,7 +657,7 @@ (if (and oneleft (not (and use-hard-newlines (get-text-property (1- (point)) 'hard)))) - (delete-backward-char 1) + (delete-char -1) (backward-char 1) (setq oneleft t))) (setq to (copy-marker (point) t)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/reftex-auc.el --- a/lisp/textmodes/reftex-auc.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/reftex-auc.el Mon May 24 22:11:08 2010 -0400 @@ -58,7 +58,7 @@ ;; 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))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/rst.el --- a/lisp/textmodes/rst.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/rst.el Mon May 24 22:11:08 2010 -0400 @@ -1787,7 +1787,7 @@ (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) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/sgml-mode.el Mon May 24 22:11:08 2010 -0400 @@ -526,7 +526,7 @@ (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 @@ (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 @@ ((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 @@ (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 @@ (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))) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/table.el --- a/lisp/textmodes/table.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/table.el Mon May 24 22:11:08 2010 -0400 @@ -919,12 +919,12 @@ (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 @@ (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) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/textmodes/texinfmt.el --- a/lisp/textmodes/texinfmt.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/textmodes/texinfmt.el Mon May 24 22:11:08 2010 -0400 @@ -2507,7 +2507,7 @@ (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)) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/time.el --- a/lisp/time.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/time.el Mon May 24 22:11:08 2010 -0400 @@ -524,7 +524,7 @@ (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 () diff -r 9ad1ee311b5e -r d835100c3e8b lisp/wid-edit.el --- a/lisp/wid-edit.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/wid-edit.el Mon May 24 22:11:08 2010 -0400 @@ -1334,7 +1334,7 @@ (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 @@ ;; 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 @@ (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 @@ ;; 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 @@ ;; 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 @@ ;; 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) diff -r 9ad1ee311b5e -r d835100c3e8b lisp/woman.el --- a/lisp/woman.el Tue May 25 10:26:03 2010 +0900 +++ b/lisp/woman.el Mon May 24 22:11:08 2010 -0400 @@ -2443,7 +2443,7 @@ (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 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 @@ 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 @@ (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)