Commit 8c504c9a905dc1cddbcbb32b368afe91f340984f
1 parent
07edf964
Tweak for clang-format and emacs font-lock
Showing
1 changed file
with
9 additions
and
1 deletions
include/qpdf/QPDFObjectHandle.hh
| @@ -1538,8 +1538,16 @@ class QPDFObjectHandle | @@ -1538,8 +1538,16 @@ class QPDFObjectHandle | ||
| 1538 | 1538 | ||
| 1539 | // If this is causing problems in your code, define | 1539 | // If this is causing problems in your code, define |
| 1540 | // QPDF_NO_QPDF_STRING to prevent the declaration from being here. | 1540 | // QPDF_NO_QPDF_STRING to prevent the declaration from being here. |
| 1541 | + | ||
| 1542 | +/* clang-format off */ | ||
| 1543 | +// Disable formatting for this declaration: emacs font-lock in cc-mode | ||
| 1544 | +// (as of 28.1) treats the rest of the file as a string if | ||
| 1545 | +// clang-format removes the space after "operator", and as of | ||
| 1546 | +// clang-format 15, there's no way to prevent it from doing so. | ||
| 1541 | QPDF_DLL | 1547 | QPDF_DLL |
| 1542 | -QPDFObjectHandle operator""_qpdf(char const* v, size_t len); | 1548 | +QPDFObjectHandle operator ""_qpdf(char const* v, size_t len); |
| 1549 | +/* clang-format on */ | ||
| 1550 | + | ||
| 1543 | #endif // QPDF_NO_QPDF_STRING | 1551 | #endif // QPDF_NO_QPDF_STRING |
| 1544 | 1552 | ||
| 1545 | class QPDFObjectHandle::QPDFDictItems | 1553 | class QPDFObjectHandle::QPDFDictItems |