[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: [emacs-w3m/emacs-w3m] Replace obsolete forms (#101)

I also see usage of function 'inline' whichsee docstring explicitly says "You don't need this."

Yes, you don't need this if running the ELisp code without byte-compiling. But when the code is compiled into elc, a function surrounded in inline will be replaced in the byte-code with its function definition itself, while compiled into the code equivalent to (funcall function-name) if it is not inlined.

 (lambda (url)
   (inline (w3m-cache-remove-1 url))))
 => #[257 "\211\302^A^H\"\303\211^B\205/^@\304^C@   \"\210^BA@\211\262^C^CAA\211\26\
2^C|\210^A\303\211\223\210\211\303\211\223\210\305^C^H\"\211^P\207" [w3m-cache-\
articles w3m-cache-hashtb assoc nil remhash delq] 8 "                           
(fn URL)"]

 (lambda (url)
   (w3m-cache-remove-1 url)))
 => #[257 "\300^A!\207" [w3m-cache-remove-1] 3 "                                    
(fn URL)"]

Using inline makes a byte-code faster, so we use inline if the code often or repeatedly runs.

You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.