comparison src/buffer.c @ 29456:1aa0c1122f75

(Fset_buffer_multibyte): Don't make the current buffer as modified if it is originally unmodified.
author Kenichi Handa <handa@m17n.org>
date Tue, 06 Jun 2000 05:41:20 +0000
parents 23090a9f86f4
children 92f92a541686
comparison
equal deleted inserted replaced
29455:31011bd2d2f0 29456:1aa0c1122f75
1873 Lisp_Object tail, markers; 1873 Lisp_Object tail, markers;
1874 struct buffer *other; 1874 struct buffer *other;
1875 int undo_enabled_p = !EQ (current_buffer->undo_list, Qt); 1875 int undo_enabled_p = !EQ (current_buffer->undo_list, Qt);
1876 int begv = BEGV, zv = ZV; 1876 int begv = BEGV, zv = ZV;
1877 int narrowed = (BEG != begv || Z != zv); 1877 int narrowed = (BEG != begv || Z != zv);
1878 int modified_p = !NILP (Fbuffer_modified_p (Qnil));
1878 1879
1879 if (current_buffer->base_buffer) 1880 if (current_buffer->base_buffer)
1880 error ("Cannot do `set-buffer-multibyte' on an indirect buffer"); 1881 error ("Cannot do `set-buffer-multibyte' on an indirect buffer");
1881 1882
1882 /* Do nothing if nothing actually changes. */ 1883 /* Do nothing if nothing actually changes. */
2102 { 2103 {
2103 other->enable_multibyte_characters 2104 other->enable_multibyte_characters
2104 = current_buffer->enable_multibyte_characters; 2105 = current_buffer->enable_multibyte_characters;
2105 other->prevent_redisplay_optimizations_p = 1; 2106 other->prevent_redisplay_optimizations_p = 1;
2106 } 2107 }
2108
2109 /* Restore the modifiedness of the buffer. */
2110 if (!modified_p && !NILP (Fbuffer_modified_p (Qnil)))
2111 Fset_buffer_modified_p (Qnil);
2107 2112
2108 return flag; 2113 return flag;
2109 } 2114 }
2110 2115
2111 DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables, 2116 DEFUN ("kill-all-local-variables", Fkill_all_local_variables, Skill_all_local_variables,