[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fca389d 3/5: Merge from emacs-24
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master fca389d 3/5: Merge from emacs-24 |
Date: |
Fri, 05 Dec 2014 20:30:23 +0000 |
branch: master
commit fca389d1d3253c58e198efaa28d175106ce5022a
Merge: 0c3f76c e97b6e6
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
Merge from emacs-24
---
admin/gitmerge.el | 25 +++++++++++--------------
lisp/ChangeLog | 14 ++++++++++++++
lisp/progmodes/prog-mode.el | 8 +++++---
lisp/simple.el | 2 +-
4 files changed, 31 insertions(+), 18 deletions(-)
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index d2f9068..206f12c 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -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'."
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2c6c377..b4e51a6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,19 @@
2014-12-05 Stefan Monnier <address@hidden>
+ * 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 <address@hidden>
+
+ * 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 <address@hidden>
+2014-12-05 Stefan Monnier <address@hidden>
+
* vc/ediff-init.el (ediff-odd-p): Remove.
(ediff-background-face): Use cl-oddp instead.
(ediff-buffer-live-p): Make it a defsubst.
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index 5037020..1cfe156 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -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
diff --git a/lisp/simple.el b/lisp/simple.el
index 46b346a..900828a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)