What is “with-eval-after-load” in Emacs Lisp

From etc/NEWS: * Lisp Changes in Emacs 24.4 … ** New macro `with-eval-after-load’. This is like the old `eval-after-load’, but better behaved. Emacs 24.4 was released on 20th October 2014. eval-after-load is considered ill-behaved because it is a function, not a macro, and thus requires the code inside it to be quoted, which means that … Read more

do while(false) pattern [duplicate]

It turns a block into a single statement. If you just use a block (i.e. code enclosed in {}) strange things can happen, for example #define STUFF() \ { do_something(); do_something_else(); } if (cond) STUFF(); else //… the extra semi-colon breaks the syntax. The do {} while(false) instead is a single statement. You can find … Read more

Why use Macros in C? [duplicate]

It’s not exactly search and replace, it’s token expansion. C macros are what every other kind of macro is in the computing world: a way to write something short and simple and have it automatically turn into something longer and more complicated. One reason macros are used is performance. They are a way of eliminating … Read more

Which Cross Platform Preprocessor Defines? (__WIN32__ or __WIN32 or WIN32 )?

This article answers your question: C/C++ tip: How to detect the operating system type using compiler predefined macros (plus archive.org link in case it vanishes). The article is quite long, and includes tables that are hard to reproduce, but here’s the essence: You can detect Unix-style OS with: #if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)