[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/aptel/dynamic-modules-rc5 7076009 12/20: * lisp/pr
From: |
Teodor Zlatanov |
Subject: |
[Emacs-diffs] feature/aptel/dynamic-modules-rc5 7076009 12/20: * lisp/progmodes/cc-defs.el: Use with-silent-modifications |
Date: |
Wed, 18 Nov 2015 19:17:04 +0000 |
branch: feature/aptel/dynamic-modules-rc5
commit 707600959b5449fb6669b09f6ffabb591d1529e3
Author: Stefan Monnier <address@hidden>
Commit: Ted Zlatanov <address@hidden>
* lisp/progmodes/cc-defs.el: Use with-silent-modifications
(c-save-buffer-state): Use with-silent-modifications when available.
(c--macroexpand-all): Check macroexpand-all directly rather than
c--mapcan-status.
---
lisp/progmodes/cc-defs.el | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 6bd5815..1b6108e 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -221,7 +221,7 @@ This variant works around bugs in `eval-when-compile' in
various
(eval-and-compile
(defmacro c--macroexpand-all (form &optional environment)
;; Macro to smooth out the renaming of `cl-macroexpand-all' in Emacs 24.3.
- (if (eq c--mapcan-status 'cl-mapcan)
+ (if (fboundp 'macroexpand-all)
`(macroexpand-all ,form ,environment)
`(cl-macroexpand-all ,form ,environment)))
@@ -508,19 +508,21 @@ must not be within a `c-save-buffer-state', since the
user then
wouldn't be able to undo them.
The return value is the value of the last form in BODY."
- `(let* ((modified (buffer-modified-p)) (buffer-undo-list t)
- (inhibit-read-only t) (inhibit-point-motion-hooks t)
- before-change-functions after-change-functions
- deactivate-mark
- buffer-file-name buffer-file-truename ; Prevent primitives checking
- ; for file modification
- ,@varlist)
- (unwind-protect
- (progn ,@body)
- (and (not modified)
- (buffer-modified-p)
- (set-buffer-modified-p nil)))))
-(put 'c-save-buffer-state 'lisp-indent-function 1)
+ (declare (debug t) (indent 1))
+ (if (fboundp 'with-silent-modifications)
+ `(with-silent-modifications (let* ,varlist ,@body))
+ `(let* ((modified (buffer-modified-p)) (buffer-undo-list t)
+ (inhibit-read-only t) (inhibit-point-motion-hooks t)
+ before-change-functions after-change-functions
+ deactivate-mark
+ buffer-file-name buffer-file-truename ; Prevent primitives checking
+ ; for file modification
+ ,@varlist)
+ (unwind-protect
+ (progn ,@body)
+ (and (not modified)
+ (buffer-modified-p)
+ (set-buffer-modified-p nil))))))
(defmacro c-tentative-buffer-changes (&rest body)
"Eval BODY and optionally restore the buffer contents to the state it
- [Emacs-diffs] branch feature/aptel/dynamic-modules-rc5 created (now 6cc9efa), Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 bdd314d 02/20: Increment Emacs version on master branch, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 cb89512 03/20: gitmerge: Try to detect cherry-picks, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 1f2b30d 04/20: gitmerge: Fix git log command, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 f9b3ca4 01/20: Update verilog-mode.el to 2015-11-09-b121d60-vpo., Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 274f590 06/20: * lisp/progmodes/verilog-mode.el: Use with-silent-modifications, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 c41bf13 08/20: * lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 d45222a 09/20: linum-mode plays more nicely with other margin-setting extensions, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 35c5205 10/20: Minor fix to comment indentation and typo in last commit, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 7076009 12/20: * lisp/progmodes/cc-defs.el: Use with-silent-modifications,
Teodor Zlatanov <=
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 7e70b27 13/20: Fix issue where a new tempfile was created every refresh, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 543b928 07/20: ; ChangeLog.2 fixes, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 e8a941e 11/20: * lisp/loadup.el: Set max-lisp-eval-depth here, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 970c64a 14/20: Add interactive seek command., Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 d3203d0 05/20: ; Auto-commit of ChangeLog files., Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 10b9929 15/20: Add catch-all & no-signal version of PUSH_HANDLER, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 1bbd450 16/20: Add portable layer for dynamic loading, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 449d1b2 17/20: Add new User Pointer (User_Ptr) type, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 39863f3 19/20: Make 'Fload' look for modules, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 6cc9efa 20/20: Add dynamic module test and helper script, Teodor Zlatanov, 2015/11/18