1

I have a multi-OS user-configuration. On OSX, when I byte-compile, the function w32-short-file-name is not defined (which is okay). What is the proper way to silence the byte-compiler for this message which will not affect the ability to use this user-configuration on Windows?

In end of data:
lawlist-dired.el:13754:1:Warning: the following functions are not known to be defined:
  w32-using-nt (3046),
  w32-short-file-name (370674)

[I am assuming I can apply the same answer to w32-using-nt.]

1

You can use declare-function to declare the files where the functions are defined. From C-hfdeclare-functionRET.

Tell the byte-compiler that function FN is defined, in FILE. Optional ARGLIST is the argument list used by the function. The FILE argument is not used by the byte-compiler, but by the ‘check-declare’ package, which checks that FILE contains a definition for FN. ARGLIST is used by both the byte-compiler and ‘check-declare’ to check for consistency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.