I had the following hook:
(add-hook 'image-mode-hook 'imagex-sticky-maximize)
imagex-sticky-maximize is a function that maximizes the image to the borders of the window. I prefer to see my images to his fullest inside the window.
This works fine so far. But I noticed that Emacs crashes if the next file is a
*.gif file. So disabling the
But I would like to enable that function when the file is a
So I was looking for a solution. I know you have the
auto-mode-alist. When you declare something like this:
(add-to-list 'auto-mode-alist '("\\.clj$\\'" . paredit-mode))
Then paredit mode will be called as minor mode, when you open file with the extension
*.clj. This works only for minor modes.
I was looking for a sort of
auto-function-alist, that calls
imagex-sticky-maximize when a specifix extension is being opened. However, I couldn't find anything of this.
Any suggestion in that direction would be appreciated.