(defun my-w3m-view-url () (interactive) (browse-url (w3m-anchor))) (eval-after-load 'w3m (define-key w3m-minor-mode-map (kbd "RET") #'my-w3m-view-url))
when byte-compiled I get error on key binding
my-w3m-view-url: Invalid function: w3m-anchor
w3m-anchor isn't a function but become macro. I try to add:
(eval-when-compile (require 'w3m-util nil :no-error))
before lines that uses
w3m-anchor. But this doesn't help me.
.emacs-my.elc file made by:
emacs -Q --batch --eval='(byte-compile-file "~/.emacs.d/.emacs-my")'
UPDATE As suggest @Iqbal Ansari I further debug issue. For some reason byte compiled file have function call instead of expanded macro:
$ strings .emacs-my.elc | grep w3m-anchor 840:(defalias 'my-w3m-view-url #[nil "\300\301 !\207" [browse-url w3m-anchor] 2 nil nil])
.emacs-my file source code is available at https://sourceforge.net/u/gavenkoa/dot-emacs/ci/default/tree/.emacs-my Corresponding installation steps are available at https://sourceforge.net/u/gavenkoa/dot-emacs/ci/default/tree/Makefile