zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.59k stars 183 forks source link

m4 macro: apostrophes are not recognized correctly #824

Closed lifenjoiner closed 3 weeks ago

lifenjoiner commented 1 month ago

Yeah, half of single quotes ...

v24.07r5332 ba5c8a8 Screenshot: m4

AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
zufuliu commented 1 month ago

It's hard to fix, single quote has at least three means in M4:

lifenjoiner commented 1 month ago

https://english.stackexchange.com/questions/36046/apostrophe-vs-single-quote: An apostrophe is only used within or at the very end of a word - it is part of the word. Single quotes are only used around words - they come in pairs, and are not part of any word.

Test the previous char?

zufuliu commented 1 month ago

f956b782a15df84d4e6f6c5a3cf7f4173ebfa338 added simple workaround for one's, don't and backquote + single quote pair.

lifenjoiner commented 1 month ago

+ friends'? https://en.wikipedia.org/wiki/Apostrophe#Importance_for_disambiguation

zufuliu commented 1 month ago
  • friends'?

Done in 4638d63ec53c1197564a002f009836579c2bfce4.

lifenjoiner commented 1 month ago

Need to exclude to be single quotes:

  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  fi
zufuliu commented 1 month ago

Need to exclude to be single quotes

Handled by fc63706177dab165b7c6c2793afcf0ecc447d9d5.