[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/gnus-cloud 1d0011b 07/28: Merge branch 'master' of
From: |
Teodor Zlatanov |
Subject: |
[Emacs-diffs] scratch/gnus-cloud 1d0011b 07/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs |
Date: |
Mon, 18 Jul 2016 14:04:12 +0000 (UTC) |
branch: scratch/gnus-cloud
commit 1d0011b3aee049fcd2a60a206632cbb2f1769abe
Merge: 9d9326a 5155144
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
lisp/progmodes/cc-engine.el | 10 +++----
lisp/progmodes/cc-fonts.el | 66 +++++++++++++++++++++++++------------------
lisp/progmodes/cc-mode.el | 22 +++++++++------
src/w32fns.c | 15 ++++++++++
4 files changed, 72 insertions(+), 41 deletions(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 48b9e5e..8648bec 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -6039,7 +6039,7 @@ comment at the start of cc-engine.el for more info."
(search-backward "\"" (max (- (point) 17) (point-min)) t))
(not (bobp)))))
(eq (char-before) ?R)
- (looking-at "\"\\([^ ()\\\n\r\t]\\{,16\\}\\)("))
+ (looking-at "\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)("))
(setq open-quote-pos (point)
open-paren-pos (match-end 1)
id (match-string-no-properties 1))
@@ -6121,7 +6121,7 @@ comment at the start of cc-engine.el for more info."
(concat "\\(" ; 1
c-anchored-cpp-prefix ; 2
"\\)\\|\\(" ; 3
- "R\"\\([^ ()\\\n\r\t]\\{,16\\}\\)(" ; 4
+ "R\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)(" ; 4
"\\)")
finish t))
(when (save-excursion
@@ -6140,7 +6140,7 @@ comment at the start of cc-engine.el for more info."
(goto-char (match-end 2)) ; after the "#".
(while (and (< (point) eom)
(c-syntactic-re-search-forward
- "R\"\\([^ ()\\\n\r\t]\\{,16\\}\\)(" eom t))
+ "R\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)(" eom t))
(c-depropertize-raw-string
(match-string-no-properties 1) ; id
(1+ (match-beginning 0)) ; open quote
@@ -6275,7 +6275,7 @@ comment at the start of cc-engine.el for more info."
(concat "\\(" ; 1
c-anchored-cpp-prefix ; 2
"\\)\\|\\(" ; 3
- "R\"\\([^ ()\\\n\r\t]\\{,16\\}\\)(" ; 4
+ "R\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)(" ; 4
"\\)")
c-new-END t))
(when (save-excursion
@@ -6294,7 +6294,7 @@ comment at the start of cc-engine.el for more info."
(goto-char (match-end 2)) ; after the "#".
(while (and (< (point) eom)
(c-syntactic-re-search-forward
- "R\"\\([^ ()\\\n\r\t]\\{,16\\}\\)(" eom t))
+ "R\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)(" eom t))
(c-propertize-raw-string-opener
(match-string-no-properties 1) ; id
(1+ (match-beginning 0)) ; open quote
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index dfc2c06..b45686c 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1542,33 +1542,45 @@ casts and declarations are fontified. Used on level 2
and higher."
;; font-lock-keyword-face. It always returns NIL to inhibit this and
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; Fontification".
- (while (search-forward-regexp
- "R\\(\"\\)\\([^ ()\\\n\r\t]\\{,16\\}\\)(" limit t)
- (when
- (or (and (eobp)
- (eq (c-get-char-property (1- (point)) 'face)
- 'font-lock-warning-face))
- (eq (c-get-char-property (point) 'face) 'font-lock-string-face)
- (and (equal (c-get-char-property (match-end 2) 'syntax-table) '(1))
- (equal (c-get-char-property (match-beginning 1) 'syntax-table)
- '(1))))
- (let ((paren-prop (c-get-char-property (1- (point)) 'syntax-table)))
- (if paren-prop
- (progn
- (c-put-font-lock-face (match-beginning 0) (match-end 0)
- 'font-lock-warning-face)
- (when
- (and
- (equal paren-prop '(15))
- (not (c-search-forward-char-property 'syntax-table '(15)
limit)))
- (goto-char limit)))
- (c-put-font-lock-face (match-beginning 1) (match-end 2) 'default)
- (when (search-forward-regexp
- (concat ")\\(" (regexp-quote (match-string-no-properties 2))
- "\\)\"")
- limit t)
- (c-put-font-lock-face (match-beginning 1) (point)
- 'default))))))
+ (let* ((state (c-state-semi-pp-to-literal (point)))
+ (string-start (and (eq (cadr state) 'string)
+ (car (cddr state))))
+ (raw-id (and string-start
+ (save-excursion
+ (goto-char string-start)
+ (and (eq (char-before) ?R)
+ (looking-at "\"\\([^ ()\\\n\r\t]\\{0,16\\}\\)(")
+ (match-string-no-properties 1))))))
+ (while (< (point) limit)
+ (if raw-id
+ (progn
+ (if (search-forward-regexp (concat ")\\(" (regexp-quote raw-id)
"\\)\"")
+ limit 'limit)
+ (c-put-font-lock-face (match-beginning 1) (point) 'default))
+ (setq raw-id nil))
+
+ (when (search-forward-regexp
+ "R\\(\"\\)\\([^ ()\\\n\r\t]\\{0,16\\}\\)(" limit 'limit)
+ (when
+ (or (and (eobp)
+ (eq (c-get-char-property (1- (point)) 'face)
+ 'font-lock-warning-face))
+ (eq (c-get-char-property (point) 'face)
'font-lock-string-face)
+ (and (equal (c-get-char-property (match-end 2) 'syntax-table)
'(1))
+ (equal (c-get-char-property (match-beginning 1)
'syntax-table)
+ '(1))))
+ (let ((paren-prop (c-get-char-property (1- (point)) 'syntax-table)))
+ (if paren-prop
+ (progn
+ (c-put-font-lock-face (match-beginning 0) (match-end 0)
+ 'font-lock-warning-face)
+ (when
+ (and
+ (equal paren-prop '(15))
+ (not (c-search-forward-char-property 'syntax-table
'(15) limit)))
+ (goto-char limit)))
+ (c-put-font-lock-face (match-beginning 1) (match-end 2)
'default)
+ (setq raw-id (match-string-no-properties 2)))))))))
nil)
(c-lang-defconst c-simple-decl-matchers
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 6711a02..04d2ed6 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -924,14 +924,16 @@ Note that the style variables are always made local to
the buffer."
;; before change function.
(goto-char c-new-BEG)
(c-beginning-of-macro)
- (setq c-new-BEG (point))
+ (when (< (point) c-new-BEG)
+ (setq c-new-BEG (max (point) (c-determine-limit 500 c-new-BEG))))
(goto-char c-new-END)
(when (c-beginning-of-macro)
(c-end-of-macro)
(or (eobp) (forward-char))) ; Over the terminating NL which may be
marked
; with a c-cpp-delimiter category property
- (setq c-new-END (point)))
+ (when (> (point) c-new-END)
+ (setq c-new-END (min (point) (c-determine-+ve-limit 500 c-new-END)))))
(defun c-depropertize-new-text (beg end old-len)
;; Remove from the new text in (BEG END) any and all text properties which
@@ -959,15 +961,17 @@ Note that the style variables are always made local to
the buffer."
;; Point is undefined on both entry and exit to this function. The buffer
;; will have been widened on entry.
;;
+ ;; c-new-BEG has already been extended in `c-extend-region-for-CPP' so we
+ ;; don't need to repeat the exercise here.
+ ;;
;; This function is in the C/C++/ObjC value of
`c-before-font-lock-functions'.
(goto-char endd)
- (if (c-beginning-of-macro)
- (c-end-of-macro))
- (setq c-new-END (max endd c-new-END (point)))
- ;; Determine the region, (c-new-BEG c-new-END), which will get font
- ;; locked. This restricts the region should there be long macros.
- (setq c-new-BEG (max c-new-BEG (c-determine-limit 500 begg))
- c-new-END (min c-new-END (c-determine-+ve-limit 500 endd))))
+ (when (c-beginning-of-macro)
+ (c-end-of-macro)
+ ;; Determine the region, (c-new-BEG c-new-END), which will get font
+ ;; locked. This restricts the region should there be long macros.
+ (setq c-new-END (min (max c-new-END (point))
+ (c-determine-+ve-limit 500 c-new-END)))))
(defun c-neutralize-CPP-line (beg end)
;; BEG and END bound a region, typically a preprocessor line. Put a
diff --git a/src/w32fns.c b/src/w32fns.c
index 0eb720e..f5e5b33 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -276,6 +276,8 @@ static struct
} kbdhook;
typedef HWND (WINAPI *GetConsoleWindow_Proc) (void);
+typedef BOOL (WINAPI *IsDebuggerPresent_Proc) (void);
+
/* stdin, from w32console.c */
extern HANDLE keyboard_handle;
@@ -2303,6 +2305,19 @@ setup_w32_kbdhook (void)
{
kbdhook.hook_count++;
+ /* This hook gets in the way of debugging, since when Emacs stops,
+ its input thread stops, and there's nothing to process keyboard
+ events, whereas this hook is global, and is invoked in the
+ context of the thread that installed it. So we don't install the
+ hook if the process is being debugged. */
+ if (w32_kbdhook_active)
+ {
+ IsDebuggerPresent_Proc is_debugger_present = (IsDebuggerPresent_Proc)
+ GetProcAddress (GetModuleHandle ("kernel32.dll"), "IsDebuggerPresent");
+ if (is_debugger_present && is_debugger_present ())
+ return;
+ }
+
/* Hooking is only available on NT architecture systems, as
indicated by the w32_kbdhook_active variable. */
if (kbdhook.hook_count == 1 && w32_kbdhook_active)
- [Emacs-diffs] scratch/gnus-cloud updated (6f939b6 -> cbd54d0), Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud b108ef0 04/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 1d9b911 02/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 9d9326a 06/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 1d0011b 07/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs,
Teodor Zlatanov <=
- [Emacs-diffs] scratch/gnus-cloud 9048d14 03/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 23262a8 11/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud fbda536 18/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 15fda1f 22/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 864e344 14/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 548f157 10/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 1aa29cc 19/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud fae4411 16/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud b996f42 27/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18
- [Emacs-diffs] scratch/gnus-cloud 9af4ba0 08/28: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs, Teodor Zlatanov, 2016/07/18