Hello Santiago, Vincent, > Here are the details of the warnings (note that the compilation of > the other .el files does not yield any warning; this is specific > to po-mode.el): > > In toplevel form: > po-mode.el:180:2: Warning: custom-declare-variable `po-highlight-face' > docstring has wrong usage of unescaped single quotes (use \= or different > quoting)
This type of warning will not be fixed. It's explained in <https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00663.html> <https://emacs.stackexchange.com/questions/73047/> that to fix this, every ' needs to be replaced with a quadrigraph \\=' . The point of this warning is to make the doc string ugly in the source file so that it becomes pretty when displayed in a certain way in Emacs. However, for po-mode.el, *no one* views these doc strings in Emacs. The maintainer — that's me — views them in the source code, outside Emacs. Therefore it would be a disgrace to make the doc strings more ugly in the source code. > In po-mode: > po-mode.el:1068:14: Warning: ‘write-contents-hooks’ is an obsolete variable > (as of 22.1); use ‘write-contents-functions’ instead. Fixed through https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=7793b37d96e1e343585fd37c19612fcffa3aa035 > In po-set-msgstr-form: > po-mode.el:2114:13: Warning: (lambda nil \...) quoted with ' rather than with > #' Referring to <https://emacs.stackexchange.com/questions/74318/>, the point of this warning is to allow the Emacs compiler to compile this lambda. But this is not necessary here, since it's a hook function (rarely invoked) and may invoke functions that are not present at compile-time. > In po-show-source-context: > po-mode.el:2570:4: Warning: ‘goto-line’ is for interactive use only; use > ‘forward-line’ instead. According to <https://stackoverflow.com/questions/11805572/> "the reason why goto-line should not be a frequently used command is that normally there's no reason to want to get to line number N unless you have a program that told you there's something interesting on that line." But that's precisely the case here: The PO file contains a reference to source line number N. Therefore goto-line is the right thing here. > In po-tags-search: > po-mode.el:2639:10: Warning: ‘tags-loop-continue’ is an obsolete function (as > of 27.1); use ‘fileloop-continue’ instead. > po-mode.el:2643:8: Warning: ‘tags-loop-continue’ is an obsolete function (as > of 27.1); use ‘fileloop-continue’ instead. fileloop-continue does not exist in Emacs 26 or older. However, po-mode supports Emacs 22 or newer. Therefore nothing to be done here. > In po-tags-loop-operate: > po-mode.el:2703:12: Warning: Use ‘with-current-buffer’ rather than > save-excursion+set-buffer > > In po-mark-found-string: > po-mode.el:2724:6: Warning: Use ‘with-current-buffer’ rather than > save-excursion+set-buffer The Emacs documentation at https://www.gnu.org/software/emacs/manual/html_node/elisp/Current-Buffer.html does not state that there would any problem with 'set-buffer'. It just presents 'with-current-buffer' as an alternative. As long as it's not broken, I won't change it. > In end of data: > po-mode.el:2110:4: Warning: the function ‘ediff-quit’ is not known to be > defined. False alarm. 'ediff-quit' is only used once ediff mode is entered. Bruno