emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 121/299: Silence some compilation warning.


From: Stefan Monnier
Subject: [elpa] 121/299: Silence some compilation warning.
Date: Sun, 02 Nov 2014 03:10:47 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit 6178c5110a24175d0d5df1410e66039ad383daba
Author: Mosè Giordano <address@hidden>
Date:   Wed May 22 20:33:21 2013 +0200

    Silence some compilation warning.
    
    * latex.el: Replace `delete-backward-char' with `delete-char'.
    
    * tex.el: Ditto.
    
    * tex-buf.el: Replace `goto-line' with `goto-char' and
    `forward-line'.
---
 ChangeLog  |    9 +++++++++
 latex.el   |   10 +++++-----
 tex-buf.el |   11 +++++++----
 tex.el     |   16 ++++++++--------
 4 files changed, 29 insertions(+), 17 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6354fbc..f65c4e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-22  Mos� Giordano  <address@hidden>
+
+       * latex.el: Replace `delete-backward-char' with `delete-char'.
+
+       * tex.el: Ditto.
+
+       * tex-buf.el: Replace `goto-line' with `goto-char' and
+       `forward-line'.
+
 2013-05-19  Mos� Giordano  <address@hidden>
 
        * doc/.gitignore: Rename from .cvsignore.
diff --git a/latex.el b/latex.el
index 7de3ef4..46acae0 100644
--- a/latex.el
+++ b/latex.el
@@ -1324,7 +1324,7 @@ The input string may include LaTeX comments and newlines."
                         (line-beginning-position 2)))
         ;; Get rid of newlines.
         ((or (string= match "\n") (string= match "\r"))
-         (delete-backward-char 1)))))
+         (delete-char -1)))))
     opts))
 
 (defvar LaTeX-provided-class-options nil
@@ -3035,7 +3035,7 @@ space does not end a sentence, so don't break a line 
there."
       (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))
@@ -5153,9 +5153,9 @@ If prefix argument FORCE is non-nil, always insert a 
regular hyphen."
                                   (point))
                 hyphen)
        (if h-after-h
-           (progn (delete-backward-char hyphen-length)
+           (progn (delete-char (- hyphen-length))
                   (insert "--"))
-         (delete-backward-char hyphen-length)
+         (delete-char (- hyphen-length))
          (call-interactively 'self-insert-command)))
        ;; -- --> [+]-
        ((string= (buffer-substring (max (- (point) 2) (point-min))
@@ -5165,7 +5165,7 @@ If prefix argument FORCE is non-nil, always insert a 
regular hyphen."
        ;; - --> "= / [+]-
        ((eq (char-before) ?-)
        (if h-after-h
-           (progn (delete-backward-char 1)
+           (progn (delete-char -1)
                   (insert hyphen))
          (call-interactively 'self-insert-command)))
        (h-after-h
diff --git a/tex-buf.el b/tex-buf.el
index 4dc1ebf..c5918fd 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1633,7 +1633,8 @@ You might want to examine and modify the free variables 
`file',
       ;; error to be displayed to the value it has in the current buffer.
       (with-current-buffer error-file-buffer
        (set (make-local-variable 'TeX-command-buffer) command-buffer))
-      (goto-line (+ offset line))
+      (goto-char (point-min))
+      (forward-line (+ offset line -1))
       (if (not (string= string " "))
          (search-forward string nil t))
       
@@ -1713,10 +1714,12 @@ You might want to examine and modify the free variables 
`file',
        (set (make-local-variable 'TeX-command-buffer) command-buffer))
       ;; Find line and string
       (when line
-       (goto-line (+ offset line))
+       (goto-char (point-min))
+       (forward-line (+ offset line -1))
        (beginning-of-line 0)
        (let ((start (point)))
-         (goto-line (+ offset line-end))
+         (goto-char (point-min))
+         (forward-line (+ offset line-end -1))
          (end-of-line)
          (when string
            (search-backward string start t)
@@ -1769,7 +1772,7 @@ You might want to examine and modify the free variables 
`file',
                             (set-buffer log-buffer))
                           (auto-save-mode nil)
                           (setq buffer-read-only t)
-                          (goto-line (point-min))
+                          (goto-char (point-min))
                           (search-forward error nil t 1))
                         (re-search-forward "^l\\." nil t)
                         (re-search-forward "^ [^\n]+$" nil t))
diff --git a/tex.el b/tex.el
index a6b0e1b..bb7b067 100644
--- a/tex.el
+++ b/tex.el
@@ -5094,7 +5094,7 @@ See also `TeX-font-replace-macro' and 
`TeX-font-replace-function'."
                (delete-char 3)
                nil)
            t))
-       (delete-backward-char 1))
+       (delete-char -1))
     (insert end)))
 
 (defun TeX-font-replace-macro (start end)
@@ -5126,7 +5126,7 @@ See also `TeX-font-replace' and 
`TeX-font-replace-function'."
        (forward-sexp 2))
       (save-excursion
        (replace-match start t t))
-      (delete-backward-char 1)
+      (delete-char -1)
       (insert end))))
 
 ;;; Dollars
@@ -5375,7 +5375,7 @@ With prefix argument FORCE, always inserts \" characters."
                            (concat (regexp-quote open-quote) "\\|"
                                    (regexp-quote close-quote))
                            (max (length open-quote) (length close-quote))))
-                        (delete-backward-char (length (match-string 0)))
+                        (delete-char (- (length (match-string 0))))
                         "\"\"")
                        ((< (save-excursion (skip-chars-backward "\"")) -1)
                         ?\")
@@ -5384,15 +5384,15 @@ With prefix argument FORCE, always inserts \" 
characters."
                        ((save-excursion
                           (forward-char -1)
                           (bobp))
-                        (delete-backward-char 1)
+                        (delete-char -1)
                         open-quote)
                        ((save-excursion
                           (forward-char -2) ;;; at -1 there is double quote
                           (looking-at "[ \t\n]\\|\\s("))
-                        (delete-backward-char 1)
+                        (delete-char -1)
                         open-quote)
                        (t
-                        (delete-backward-char 1)
+                        (delete-char -1)
                         close-quote)))
        (insert (cond ((bobp)
                       open-quote)
@@ -5403,12 +5403,12 @@ With prefix argument FORCE, always inserts \" 
characters."
                      ((save-excursion
                         (forward-char (- (length open-quote)))
                         (looking-at (regexp-quote open-quote)))
-                      (delete-backward-char (length open-quote))
+                      (delete-char (- (length open-quote)))
                       ?\")
                      ((save-excursion
                         (forward-char (- (length close-quote)))
                         (looking-at (regexp-quote close-quote)))
-                      (delete-backward-char (length close-quote))
+                      (delete-char (- (length close-quote)))
                       ?\")
                      ((save-excursion
                         (forward-char -1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]