diff options
| author | Lars Ingebrigtsen | 2016-04-30 23:34:29 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-05-01 19:27:16 +0200 |
| commit | 9722ae18c3aa7243185fb005241f337712ac0ac5 (patch) | |
| tree | 71aa094a9a6adc909af62cfca0b46a9c02f40593 /lisp | |
| parent | 3bc26a7080a1394a65f614b1b398af3f851eefd7 (diff) | |
| download | emacs-9722ae18c3aa7243185fb005241f337712ac0ac5.tar.gz emacs-9722ae18c3aa7243185fb005241f337712ac0ac5.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).
(cherry picked from commit e0e70f030e69d9696a963a86f5f7caaff4df06eb)
Diffstat (limited to 'lisp')
| -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 23e7d01e6de..3f5d6e427e9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3291,6 +3291,8 @@ See also `with-temp-file' and `with-output-to-string'." | |||
| 3291 | 3291 | ||
| 3292 | (defmacro with-silent-modifications (&rest body) | 3292 | (defmacro with-silent-modifications (&rest body) |
| 3293 | "Execute BODY, pretending it does not modify the buffer. | 3293 | "Execute BODY, pretending it does not modify the buffer. |
| 3294 | This macro is Typically used around modifications of | ||
| 3295 | text-properties which do not really affect the buffer's content. | ||
| 3294 | If BODY performs real modifications to the buffer's text, other | 3296 | If BODY performs real modifications to the buffer's text, other |
| 3295 | than cosmetic ones, undo data may become corrupted. | 3297 | than cosmetic ones, undo data may become corrupted. |
| 3296 | 3298 | ||
| @@ -3298,10 +3300,7 @@ This macro will run BODY normally, but doesn't count its buffer | |||
| 3298 | modifications as being buffer modifications. This affects things | 3300 | modifications as being buffer modifications. This affects things |
| 3299 | like `buffer-modified-p', checking whether the file is locked by | 3301 | like `buffer-modified-p', checking whether the file is locked by |
| 3300 | someone else, running buffer modification hooks, and other things | 3302 | someone else, running buffer modification hooks, and other things |
| 3301 | of that nature. | 3303 | of that nature." |
| 3302 | |||
| 3303 | Typically used around modifications of text-properties which do | ||
| 3304 | not really affect the buffer's content." | ||
| 3305 | (declare (debug t) (indent 0)) | 3304 | (declare (debug t) (indent 0)) |
| 3306 | (let ((modified (make-symbol "modified"))) | 3305 | (let ((modified (make-symbol "modified"))) |
| 3307 | `(let* ((,modified (buffer-modified-p)) | 3306 | `(let* ((,modified (buffer-modified-p)) |