Re: Wrapping my head around icon-map-list

Michael Heerdegen via Users list for the GNU Emacs text editor <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
Antonio Romano <[email protected]> writes:

> The default value of `icon-map-list` is this:
>     (x-gtk-stock-map)
> which is the symbol pointing to an alist filled with default mappings:
>     (("etc/images/new" "document-new" "gtk-new")
>      ("etc/images/open" "document-open" "gtk-open")
>      ("etc/images/diropen" . "gtk-directory")
>      ("etc/images/close" "window-close" "gtk-close")
>      ("etc/images/save" "document-save" "gtk-save")
>      ("etc/images/cut" "edit-cut" "gtk-cut")
>      ...)
>
> (I don't understand why most entries are lists instead of
>     conses.)

Non-nil Lists are conses:

  (A B ...) == (A . (B ...))

See the definition of `x-gtk-stock-map' which uses the second syntax.


> Having read this, I tried edited the `icon-map-list` as by prepending
> a personal alist as follows:
>
> (setopt icon-map-list (cons '("etc/images/diropen" . "document-new")
> 			    icon-map-list))
>  => (("etc/images/diropen" . "document-new") x-gtk-stock-map)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     This is not an alist, it is a single element.

So there is a level of parens missing, no?

> but opening Emacs now results in the toolbar failing to show and the
> frame doing some weird display glitches. Trying to append the alist
> does
> nothing, instead. What am I doing wrong? Is this variable even planned
> for personal customization?

It's a user option so I would definitely assume it.


Michael.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.