diff options
| author | Lars Ingebrigtsen | 2016-04-30 23:34:29 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-04-30 23:34:29 +0200 |
| commit | e0e70f030e69d9696a963a86f5f7caaff4df06eb (patch) | |
| tree | 3ff081f9042d6f50499156c568477fbd83280a0b | |
| parent | 1aaeaf1450756a71c9254a2a5b174c72084ca67a (diff) | |
| download | emacs-e0e70f030e69d9696a963a86f5f7caaff4df06eb.tar.gz emacs-e0e70f030e69d9696a963a86f5f7caaff4df06eb.zip | |
with-silent-modifications doc clarification
* lisp/subr.el (with-silent-modifications): Rearrange the doc
string a bit so that the most pertinent information is at the
top (bug#21171).
| -rw-r--r-- | lisp/subr.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index a2af6421173..5f8d830051c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3457,6 +3457,8 @@ See also `with-temp-file' and `with-output-to-string'." | |||
| 3457 | 3457 | ||
| 3458 | (defmacro with-silent-modifications (&rest body) | 3458 | (defmacro with-silent-modifications (&rest body) |
| 3459 | "Execute BODY, pretending it does not modify the buffer. | 3459 | "Execute BODY, pretending it does not modify the buffer. |
| 3460 | This macro is Typically used around modifications of | ||
| 3461 | text-properties which do not really affect the buffer's content. | ||
| 3460 | If BODY performs real modifications to the buffer's text, other | 3462 | If BODY performs real modifications to the buffer's text, other |
| 3461 | than cosmetic ones, undo data may become corrupted. | 3463 | than cosmetic ones, undo data may become corrupted. |
| 3462 | 3464 | ||
| @@ -3464,10 +3466,7 @@ This macro will run BODY normally, but doesn't count its buffer | |||
| 3464 | modifications as being buffer modifications. This affects things | 3466 | modifications as being buffer modifications. This affects things |
| 3465 | like `buffer-modified-p', checking whether the file is locked by | 3467 | like `buffer-modified-p', checking whether the file is locked by |
| 3466 | someone else, running buffer modification hooks, and other things | 3468 | someone else, running buffer modification hooks, and other things |
| 3467 | of that nature. | 3469 | of that nature." |
| 3468 | |||
| 3469 | Typically used around modifications of text-properties which do | ||
| 3470 | not really affect the buffer's content." | ||
| 3471 | (declare (debug t) (indent 0)) | 3470 | (declare (debug t) (indent 0)) |
| 3472 | (let ((modified (make-symbol "modified"))) | 3471 | (let ((modified (make-symbol "modified"))) |
| 3473 | `(let* ((,modified (buffer-modified-p)) | 3472 | `(let* ((,modified (buffer-modified-p)) |