GNU bug report logs - #64177
outline-minor-mode-highlight fails to activate for custom headings

Previous Next

Package: emacs;

Reported by: uzibalqa <uzibalqa <at> proton.me>

Date: Mon, 19 Jun 2023 20:14:02 UTC

Severity: normal

Merged with 64227

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: uzibalqa <uzibalqa <at> proton.me>
To: Juri Linkov <juri <at> linkov.net>
Cc: 64177 <at> debbugs.gnu.org
Subject: bug#64177: outline-minor-mode-highlight fails to activate for custom headings
Date: Tue, 20 Jun 2023 10:55:44 +0000
------- Original Message -------
On Tuesday, June 20th, 2023 at 6:50 PM, Juri Linkov <juri <at> linkov.net> wrote:


> > I have made custom headings for outline-minor-mode
> > 
> > But
> > 
> > (setq outline-minor-mode-highlight 'override)
> > 
> > does not succeed in displaying the foreground colours at the
> > defined levels when using
> > 
> > (set-face-foreground "outline-1" "#ff62d4")
> > (set-face-foreground "outline-2" "#9f80ff")
> > (set-face-foreground "outline-3" "#fe6060")
> > 
> > Yet, the colours get properly displayed for the default headings
> > for the specific major mode
> 
> 
> Thanks for the bug report. It's still not clear how to test it.
> When tried to evaluate (set-face-foreground "outline-1" "#ff62d4")
> it failed with Lisp error: (wrong-type-argument symbolp "outline-1")
> because the right syntax is (set-face-foreground 'outline-1 "#ff62d4").
> Does it work with this fix?

I have done this and still showing failure upon 'override

(defvar elisp-hglevels
  '( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) (";;; H4" . 4)
     (";;; H5" . 5) (";;; H6" . 6) (";;; H7" . 7) (";;; H8" . 8) ))

;;-------------

(defun outlhg-regexp ()

  (cond
    ((eq major-mode 'emacs-lisp-mode)
          (let ( (hrklevels elisp-hrklevels) )
            (setq outline-regexp
                  (concat (regexp-opt (mapcar 'car hrklevels)) "\\>"))
            (setq outline-heading-alist hrklevels))) ))

;; ---------

(defun outlhg-tyface ()
  (interactive)

  (let* ( (pigment-darkbg  '("#ff62d4" "#9f80ff" "#fe6060" "#fba849"
                             "#4fe42f" "#4fafff" "#f0dd60" "#FFFFFF"))
          (pigment-lightbg '("#1f1fce" "#006800" "#b60000" "#605b00"
                             "#a8007f" "#005f88" "#904200" "#7f10d0"))
          (pigment
           (if (eq (frame-parameter nil 'background-mode) 'dark)
               pigment-darkbg
             pigment-lightbg)) )

    (dotimes (i 8)
      (let ((hkfc (intern (format "outline-%d" (1+ i))))
            (colr (nth i pigment)))
        (set-face-foreground hkfc colr)))))
 
;;------------- 

(outline-minor-mode 0)
(setq outline-minor-mode-highlight 'override)
(outlhg-regexp)
(outlhg-tyface)
(outline-minor-mode 1)




This bug report was last modified 1 year and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.