diff options
Diffstat (limited to 'personal')
| -rw-r--r-- | personal/itches.md | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/personal/itches.md b/personal/itches.md index e812276..acc71c3 100644 --- a/personal/itches.md +++ b/personal/itches.md @@ -38,7 +38,9 @@ on empty input; it chooses ".", which AFAICT comes from the fact that icomplete-exhibit calls completion-pcm--filename-try-filter while icomplete-force-complete-and-exit simply calls - minibuffer-force-complete-and-exit. + minibuffer-force-complete-and-exit + - likewise, if a folder contains foo.c and foo.o, "C-x C-f foo" + hides foo.o, yet C-j completes to foo.o - minor-mode to automatically surround word with delimiter when typed in the middle of a word - customize " Compiling" mode-line indicator @@ -172,7 +174,7 @@ Things to investigate: 2. What does the code calling `decode_mode_spec` do with the returned string? **🎉** 3. (Does `SSDATA` make some transformation before returning the - string? 🤷) + string? 🤷) 4. (Should a specialized Custom setter be defined? 🤷) ##### Should the `Lisp_Object` be created with something other than `build_pure_c_string`? @@ -188,6 +190,8 @@ That looks too ugly though, let's try something else. Maybe `STRING_SET_MULTIBYTE(Vnarrow_lighter)` would help? +*compiles and tries* + … Nope, it does not. ##### What does the code calling `decode_mode_spec` do with the returned string? @@ -201,15 +205,34 @@ multibyte = STRINGP (string) && STRING_MULTIBYTE (string); *finds `string` standing right there with a blank stare* -Gah! How long have you been there? +Gah! How long have you been there? ``` c /* Return a string for the output of a mode line %-spec for window W, generated by character C. … Return a Lisp string in *STRING if the resulting string is taken from that Lisp string. - - Note we operate on the current buffer for most purposes. */ - + … */ +static const char * +decode_mode_spec (struct window *w, register int c, int field_width, + Lisp_Object *string) +{ + Lisp_Object obj; + /* … */ + obj = Qnil; + *string = Qnil; + + switch (c) + { + /* … */ + } + if (STRINGP (obj)) + { + *string = obj; + return SSDATA (obj); + } + else + return ""; +} ``` ### Dumb questions |
