emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 1bb8ac0 4/7: Merge from origin/emacs-26


From: Paul Eggert
Subject: [Emacs-diffs] master 1bb8ac0 4/7: Merge from origin/emacs-26
Date: Mon, 25 Sep 2017 14:22:10 -0400 (EDT)

branch: master
commit 1bb8ac0c02d91c64ae14e37680fc90ff899da2b4
Merge: 00a86a5 48d39c3
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-26
    
    48d39c39e8 Search for Syntax section when viewing MDN
    9d101376b4 Allow smerge-keep-current to work for empty hunks
    13aba24add Call vc-setup-buffer in vc-git-log-{in,out}going
    1d599df5e0 Fix last change to textmodes/page-ext.el
    a726e09a9a * test/src/lcms-tests.el (lcms-cri-cam02-ucs): Skip if lcm...
---
 lisp/textmodes/css-mode.el        |  2 +-
 lisp/textmodes/page-ext.el        |  2 ++
 lisp/vc/smerge-mode.el            |  2 +-
 lisp/vc/vc-git.el                 |  2 ++
 test/lisp/vc/smerge-mode-tests.el | 34 ++++++++++++++++++++++++++++++++++
 test/src/lcms-tests.el            |  1 +
 6 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index dde9e6a..ce9bbf4 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1578,7 +1578,7 @@ to look up will be substituted there."
   (goto-char (point-min))
   (let ((window (get-buffer-window (current-buffer) 'visible)))
     (when window
-      (when (re-search-forward "^Summary" nil 'move)
+      (when (re-search-forward "^\\(Summary\\|Syntax\\)" nil 'move)
         (beginning-of-line)
         (set-window-start window (point))))))
 
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index d744bd2..94b68de 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -583,6 +583,7 @@ directory for only the accessible portion of the buffer."
     (with-output-to-temp-buffer pages-directory-buffer
       (with-current-buffer standard-output
         (pages-directory-mode)
+        (setq buffer-read-only nil)
         (insert
          "==== Pages Directory: use `C-c C-c' to go to page under cursor. 
====" ?\n)
         (setq pages-buffer pages-target-buffer)
@@ -631,6 +632,7 @@ directory for only the accessible portion of the buffer."
                 )))))
 
       (set-buffer standard-output)
+      (setq buffer-read-only t)
       ;; Put positions in increasing order to go with buffer.
       (setq pages-pos-list (nreverse pages-pos-list))
       (if (called-interactively-p 'interactive)
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 112a9bc..91be89b 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -725,7 +725,7 @@ this keeps \"UUU\"."
   (let ((i 3))
     (while (or (not (match-end i))
               (< (point) (match-beginning i))
-              (>= (point) (match-end i)))
+              (> (point) (match-end i)))
       (cl-decf i))
     i))
 
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 095f184..9d7a4d4 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1035,6 +1035,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (defun vc-git-log-outgoing (buffer remote-location)
   (interactive)
+  (vc-setup-buffer buffer)
   (vc-git-command
    buffer 'async nil
    "log"
@@ -1048,6 +1049,7 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (defun vc-git-log-incoming (buffer remote-location)
   (interactive)
+  (vc-setup-buffer buffer)
   (vc-git-command nil 0 nil "fetch")
   (vc-git-command
    buffer 'async nil
diff --git a/test/lisp/vc/smerge-mode-tests.el 
b/test/lisp/vc/smerge-mode-tests.el
new file mode 100644
index 0000000..204a4b9
--- /dev/null
+++ b/test/lisp/vc/smerge-mode-tests.el
@@ -0,0 +1,34 @@
+;; Copyright (C) 2017  Free Software Foundation, Inc
+
+;; Maintainer: address@hidden
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'smerge-mode)
+
+(ert-deftest smerge-mode-test-empty-hunk ()
+  "Regression test for bug #25555"
+  (with-temp-buffer
+    (insert "<<<<<<< one\n")
+    (save-excursion
+      (insert "=======\nLLL\n>>>>>>> end\n"))
+    (smerge-mode)
+    (smerge-keep-current)
+    (should (equal (buffer-substring (point-min) (point-max)) ""))))
+
+(provide 'smerge-mode-tests)
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index 962902e..3d0942c 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -51,6 +51,7 @@ B is considered the exact value."
 
 (ert-deftest lcms-cri-cam02-ucs ()
   "Test use of `lcms-cam02-ucs'."
+  (skip-unless (featurep 'lcms2))
   (should-error (lcms-cam02-ucs '(0 0 0) '(0 0 0) "error"))
   (should-error (lcms-cam02-ucs '(0 0 0) 'error))
   (should-not



reply via email to

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