]> git.eshelyaron.com Git - emacs.git/commitdiff
Make tables more resistant to major mode changes
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 17 Nov 2019 09:06:28 +0000 (10:06 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 17 Nov 2019 09:06:28 +0000 (10:06 +0100)
* lisp/textmodes/table.el (table--put-cell-face-property)
(table--remove-cell-properties): Ensure that we don't lose the
table face when switching from buffers with font locking to ones
without (or vice versa) (bug#35481).

lisp/textmodes/table.el

index 839df035d2737822e199b9f3d94c319c19db06d2..92aaa46ad6dc7b87acb373117443bc7529c66f58 100644 (file)
@@ -5151,7 +5151,7 @@ and the right cell border character."
 
 (defun table--put-cell-face-property (beg end &optional object)
   "Put cell face property."
-  (put-text-property beg end 'face 'table-cell object))
+  (put-text-property beg end 'font-lock-face 'table-cell object))
 
 (defun table--put-cell-keymap-property (beg end &optional object)
   "Put cell keymap property."
@@ -5178,7 +5178,7 @@ instead of the current buffer and returns the OBJECT."
                                   'table-cell nil
                                   'table-justify nil
                                   'table-valign nil
-                                  'face nil
+                                  'font-lock-face nil
                                   'rear-nonsticky nil
                                   'cursor-sensor-functions nil
                                   'keymap nil)