]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-24
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Dec 2014 20:20:02 +0000 (15:20 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 5 Dec 2014 20:20:02 +0000 (15:20 -0500)
admin/gitmerge.el
lisp/ChangeLog
lisp/progmodes/prog-mode.el
lisp/simple.el

index d2f906806c8528606f744f8daeef881a2280daa0..206f12c08ad5c3c2e0ef76ecd27be54374c2d2be 100644 (file)
@@ -90,6 +90,14 @@ Auto-commit"
     map)
   "Keymap for gitmerge major mode.")
 
+
+(defvar gitmerge-mode-font-lock-keywords
+  `((,gitmerge-log-regexp
+     (1 font-lock-warning-face)
+     (2 font-lock-constant-face)
+     (3 font-lock-builtin-face)
+     (4 font-lock-comment-face))))
+
 (defvar gitmerge--commits nil)
 (defvar gitmerge--from nil)
 
@@ -459,23 +467,12 @@ Branch FROM will be prepended to the list."
       (prog1 (read (buffer-string))
        (kill-buffer)))))
 
-(defun gitmerge-mode ()
+(define-derived-mode gitmerge-mode special-mode "gitmerge"
   "Major mode for Emacs branch merging."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'gitmerge-mode)
-  (setq mode-name "gitmerge")
   (set-syntax-table text-mode-syntax-table)
-  (use-local-map gitmerge-mode-map)
-  (make-local-variable 'font-lock-defaults)
-  (setq gitmerge-mode-font-lock-keywords
-       (list (list gitmerge-log-regexp
-                   '(1 font-lock-warning-face)
-                   '(2 font-lock-constant-face)
-                   '(3 font-lock-builtin-face)
-                   '(4 font-lock-comment-face))))
   (setq buffer-read-only t)
-  (setq font-lock-defaults '(gitmerge-mode-font-lock-keywords)))
+  (setq-local truncate-lines t)
+  (setq-local font-lock-defaults '(gitmerge-mode-font-lock-keywords)))
 
 (defun gitmerge (from)
   "Merge from branch FROM into `default-directory'."
index 2c6c377dfcec0964fe461f3cd6174c9222d2b9cd..b4e51a6eebb21dfe245acbe432b64f019d1157a3 100644 (file)
@@ -1,3 +1,17 @@
+2014-12-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * progmodes/prog-mode.el (prettify-symbols--compose-symbol):
+       Fix handling of symbols with different syntax at beginning/end or with
+       symbol rather than word syntax.
+
+2014-12-05  Eli Zaretskii  <eliz@gnu.org>
+
+       * simple.el (line-move): If noninteractive, call line-move-1, not
+       forward-line, since the former is compatible with line-move-visual
+       both in terms of the column to which it moves and the return
+       value.  (Bug#19211)
+
+2014-12-05  Stephen Berman  <stephen.berman@gmx.net>
 2014-12-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/ediff-init.el (ediff-odd-p): Remove.
index 5037020f94e403bc9c5753741bde3cff5d204f92..1cfe1568813c4becc3f588d18928a586cb38d95d 100644 (file)
@@ -73,11 +73,13 @@ Regexp match data 0 points to the chars."
   ;; Check that the chars should really be composed into a symbol.
   (let* ((start (match-beginning 0))
         (end (match-end 0))
-        (syntaxes (if (eq (char-syntax (char-after start)) ?w)
+        (syntaxes-beg (if (memq (char-syntax (char-after start)) '(?w ?_))
+                           '(?w ?_) '(?. ?\\)))
+        (syntaxes-end (if (memq (char-syntax (char-before end)) '(?w ?_))
                       '(?w ?_) '(?. ?\\)))
         match)
-    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes)
-           (memq (char-syntax (or (char-after end) ?\s)) syntaxes)
+    (if (or (memq (char-syntax (or (char-before start) ?\s)) syntaxes-beg)
+           (memq (char-syntax (or (char-after end) ?\s)) syntaxes-end)
             ;; syntax-ppss could modify the match data (bug#14595)
             (progn (setq match (match-string 0)) (nth 8 (syntax-ppss))))
        ;; No composition for you.  Let's actually remove any composition
index 46b346a8fd2810c99ba34217fd93c866a79e97b8..900828aad1cc06244189c5d9710fd45e404dbcdc 100644 (file)
@@ -5541,7 +5541,7 @@ TRY-VSCROLL controls whether to vscroll tall lines: if either
 `auto-window-vscroll' or TRY-VSCROLL is nil, this function will
 not vscroll."
   (if noninteractive
-      (forward-line arg)
+      (line-move-1 arg noerror to-end)
     (unless (and auto-window-vscroll try-vscroll
                 ;; Only vscroll for single line moves
                 (= (abs arg) 1)