* bug#14523: Inconsistency in font-lock/lisp mode for docstrings
@ 2013-05-31 17:33 Max Rottenkolber
2013-05-31 17:54 ` bug#14523: bug#14509: Centerd calendar buffer E Sabof
2013-06-01 0:13 ` bug#14523: Inconsistency in font-lock/lisp mode for docstrings Glenn Morris
0 siblings, 2 replies; 5+ messages in thread
From: Max Rottenkolber @ 2013-05-31 17:33 UTC (permalink / raw)
To: 14523
Greetings everybody,
On "GNU Emacs 24.2.1 (i486-slackware-linux-gnu, GTK+ Version 2.24.10) of
2012-08-31 on hive" using font-lock-mode it conjunction with lisp mode
(and Common Lisp code): If font-lock-doc-face != font-lock-string-face
docstrings are marked up inconsistently. E.g. DEFUN's docstrings use the
first face, but DEVAR docstrings use the latter face.
Cheers,
max
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14523: bug#14509: Centerd calendar buffer
2013-05-31 17:33 bug#14523: Inconsistency in font-lock/lisp mode for docstrings Max Rottenkolber
@ 2013-05-31 17:54 ` E Sabof
2013-05-31 18:27 ` bug#14509: Fwd: " E Sabof
2013-06-01 0:13 ` bug#14523: Inconsistency in font-lock/lisp mode for docstrings Glenn Morris
1 sibling, 1 reply; 5+ messages in thread
From: E Sabof @ 2013-05-31 17:54 UTC (permalink / raw)
To: 14523
[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]
A better version:
(defun es-calendar-recenter (&optional all-frames)
(let (( calendar-width
(+ (* 7 3 3)
(* 2 calendar-intermonth-spacing)
-1)))
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp "^ +" nil t)
(put-text-property
(match-beginning 0)
(match-end 0)
'display
`(space :align-to (+ center (,(/ calendar-width -2)
. width))))))))
(defadvice calendar-generate (after center-calendar activate)
(es-calendar-recenter t))
(eval-after-load 'calendar
'(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."
(if (bufferp (get-buffer calendar-buffer))
(with-current-buffer calendar-buffer
(let* ((start (- calendar-left-margin 2))
(date (condition-case nil
(calendar-cursor-to-nearest-date)
(error (calendar-current-date))))
(content-string (calendar-string-spread
(mapcar 'eval calendar-mode-line-format)
?\s (- calendar-right-margin (1-
start)))))
(setq mode-line-format
(concat (propertize
" "
'display
`(space :align-to (+ center (,(/ (length
content-string) -2) . width))))
content-string)))
(force-mode-line-update)))))
[-- Attachment #2: Type: text/html, Size: 2235 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14509: Fwd: bug#14509: Centerd calendar buffer
2013-05-31 17:54 ` bug#14523: bug#14509: Centerd calendar buffer E Sabof
@ 2013-05-31 18:27 ` E Sabof
0 siblings, 0 replies; 5+ messages in thread
From: E Sabof @ 2013-05-31 18:27 UTC (permalink / raw)
To: 14509
[-- Attachment #1: Type: text/plain, Size: 1583 bytes --]
A better version:
(defun es-calendar-recenter (&optional all-frames)
(let (( calendar-width
(+ (* 7 3 3)
(* 2 calendar-intermonth-spacing)
-1)))
(save-excursion
(goto-char (point-min))
(while (search-forward-regexp "^ +" nil t)
(put-text-property
(match-beginning 0)
(match-end 0)
'display
`(space :align-to (+ center (,(/ calendar-width -2)
. width))))))))
(defadvice calendar-generate (after center-calendar activate)
(es-calendar-recenter t))
(eval-after-load 'calendar
'(defun calendar-update-mode-line ()
"Update the calendar mode line with the current date and date style."
(if (bufferp (get-buffer calendar-buffer))
(with-current-buffer calendar-buffer
(let* ((start (- calendar-left-margin 2))
(date (condition-case nil
(calendar-cursor-to-nearest-date)
(error (calendar-current-date))))
(content-string (calendar-string-spread
(mapcar 'eval calendar-mode-line-format)
?\s (- calendar-right-margin (1-
start)))))
(setq mode-line-format
(concat (propertize
" "
'display
`(space :align-to (+ center (,(/ (length
content-string) -2) . width))))
content-string)))
(force-mode-line-update)))))
[-- Attachment #2: Type: text/html, Size: 2315 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14523: Inconsistency in font-lock/lisp mode for docstrings
2013-05-31 17:33 bug#14523: Inconsistency in font-lock/lisp mode for docstrings Max Rottenkolber
2013-05-31 17:54 ` bug#14523: bug#14509: Centerd calendar buffer E Sabof
@ 2013-06-01 0:13 ` Glenn Morris
[not found] ` <1N6VR9X.NVUL8C3D4P75@mr.gy>
1 sibling, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2013-06-01 0:13 UTC (permalink / raw)
To: Max Rottenkolber; +Cc: 14523
Max Rottenkolber wrote:
> On "GNU Emacs 24.2.1 (i486-slackware-linux-gnu, GTK+ Version 2.24.10) of
> 2012-08-31 on hive" using font-lock-mode it conjunction with lisp mode
> (and Common Lisp code): If font-lock-doc-face != font-lock-string-face
> docstrings are marked up inconsistently. E.g. DEFUN's docstrings use the
> first face, but DEVAR docstrings use the latter face.
Please give a complete example starting from emacs -Q.
I cannot reproduce this with:
emacs-24.2 -Q foo.el
where foo.el has contents:
(defun func () "function doc" t)
(defvar var "blah" "var doc")
Both doc-strings are in font-lock-doc-face.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14523: Inconsistency in font-lock/lisp mode for docstrings
[not found] ` <20906.13034.711621.506963@gnu.org>
@ 2013-06-01 17:49 ` Glenn Morris
0 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2013-06-01 17:49 UTC (permalink / raw)
To: Max Rottenkolber, 14523
Glenn Morris wrote (on Sat, 1 Jun 2013 at 13:44 -0400):
> Please keep the debbugs address cc'd.
Otherwise when the person you are replying to puts the bug number in
by hand, they might get the wrong one, like I did. Sigh.
Max Rottenkolber wrote (on Sat, 1 Jun 2013 at 10:22 +0200):
> M-x customize-face RET font-lock-doc-face RET
>
> Find file foo .lisp, enter:
>
> (defun ()
> "redish"
> 13)
Surely this defun is missing a name?
> (defvar *x* nil
> "whatever you set doc-face to.")
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-01 17:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 17:33 bug#14523: Inconsistency in font-lock/lisp mode for docstrings Max Rottenkolber
2013-05-31 17:54 ` bug#14523: bug#14509: Centerd calendar buffer E Sabof
2013-05-31 18:27 ` bug#14509: Fwd: " E Sabof
2013-06-01 0:13 ` bug#14523: Inconsistency in font-lock/lisp mode for docstrings Glenn Morris
[not found] ` <1N6VR9X.NVUL8C3D4P75@mr.gy>
[not found] ` <20906.13034.711621.506963@gnu.org>
2013-06-01 17:49 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).