comparison lisp/log-edit.el @ 111778:154433017097

Fix log-edit-font-lock-keywords (Bug#6465). * log-edit.el (log-edit-font-lock-keywords): Don't try matching stand-alone lines, since that is handled by log-edit-match-to-eoh (Bug#6465).
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 27 Nov 2010 14:41:49 -0500
parents 8027e412df98
children 9dd98ad8946c
comparison
equal deleted inserted replaced
111777:68ad8caf0020 111778:154433017097
348 (point)))) 348 (point))))
349 349
350 (defvar log-edit-font-lock-keywords 350 (defvar log-edit-font-lock-keywords
351 ;; Copied/inspired by message-font-lock-keywords. 351 ;; Copied/inspired by message-font-lock-keywords.
352 `((log-edit-match-to-eoh 352 `((log-edit-match-to-eoh
353 (,(concat "^\\(\\([a-z]+\\):\\)" log-edit-header-contents-regexp 353 (,(concat "^\\(\\([a-z]+\\):\\)" log-edit-header-contents-regexp)
354 "\\|\\(.*\\)")
355 (progn (goto-char (match-beginning 0)) (match-end 0)) nil 354 (progn (goto-char (match-beginning 0)) (match-end 0)) nil
356 (1 (if (assoc (match-string 2) log-edit-headers-alist) 355 (1 (if (assoc (match-string 2) log-edit-headers-alist)
357 'log-edit-header 356 'log-edit-header
358 'log-edit-unknown-header) 357 'log-edit-unknown-header)
359 nil lax) 358 nil lax)
359 ;; From `log-edit-header-contents-regexp':
360 (3 (or (cdr (assoc (match-string 2) log-edit-headers-alist)) 360 (3 (or (cdr (assoc (match-string 2) log-edit-headers-alist))
361 'log-edit-header) 361 'log-edit-header)
362 nil lax) 362 nil lax)))))
363 (4 font-lock-warning-face)))))
364 363
365 ;;;###autoload 364 ;;;###autoload
366 (defun log-edit (callback &optional setup params buffer mode &rest ignore) 365 (defun log-edit (callback &optional setup params buffer mode &rest ignore)
367 "Setup a buffer to enter a log message. 366 "Setup a buffer to enter a log message.
368 \\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode' 367 \\<log-edit-mode-map>The buffer will be put in mode MODE or `log-edit-mode'