diff options
| author | Stefan Monnier | 2014-09-26 18:19:12 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-09-26 18:19:12 -0400 |
| commit | 6a19cde634d233f44c8db61ae4f6d54c07e277fb (patch) | |
| tree | bf4f1b230f4794141b118e1c3d8f858217a471ec | |
| parent | 56c6a28d018e8735b14e9bf170c3867cc48374fc (diff) | |
| download | emacs-6a19cde634d233f44c8db61ae4f6d54c07e277fb.tar.gz emacs-6a19cde634d233f44c8db61ae4f6d54c07e277fb.zip | |
* etc/TODO: Add a few entries, remove others, expand some
| -rw-r--r-- | etc/TODO | 129 |
1 files changed, 107 insertions, 22 deletions
| @@ -26,12 +26,62 @@ are the ones we consider more important, but these also may be | |||
| 26 | difficult to fix. Bugs with severity "minor" may be simpler, but this | 26 | difficult to fix. Bugs with severity "minor" may be simpler, but this |
| 27 | is not always true. | 27 | is not always true. |
| 28 | 28 | ||
| 29 | * Tentative plan for Emacs-24 | 29 | * Speed up Elisp execution |
| 30 | ** Speed up function calls | ||
| 31 | Change src/bytecode.c so that calls from byte-code functions to byte-code | ||
| 32 | functions don't go through Ffuncall/funcall_lambda/exec_byte_code but instead | ||
| 33 | stay within exec_byte_code. | ||
| 34 | |||
| 35 | ** Add new `switch' byte-code | ||
| 36 | This byte-code would take one argument from the stack (the object to test) | ||
| 37 | and one argument from the constant-pool (a switch table, implemented as an | ||
| 38 | eq-hashtable) and would jump to the "label" contained in the hashtable. | ||
| 39 | |||
| 40 | Then add a `case' special-form that can be compiled to this byte-code. | ||
| 41 | This would behave just like cl-case, but instead of expanding to cond+eq it | ||
| 42 | would be its own special form and would be compiled specially. | ||
| 43 | |||
| 44 | Then change pcase to use `case' when applicable. | ||
| 45 | |||
| 46 | Then change the byte-compiler to recognize (cond ((eq x 'foo) bar) ...) | ||
| 47 | and turn it into a `case' for more efficient execution. | ||
| 48 | |||
| 49 | ** Improve the byte-compiler to recognize immutable (lexical) bindings | ||
| 50 | and get rid of them if they're used only once and/or they're bound to | ||
| 51 | a constant expression. | ||
| 52 | |||
| 53 | Such things aren't present in hand-written code, but macro expansion and | ||
| 54 | defsubst can often end up generating things like | ||
| 55 | (funcall (lambda (arg) (body)) actual) which then get optimized to | ||
| 56 | (let ((arg actual)) (body)) but should additionally get optimized further | ||
| 57 | when `actual' is a constant/copyable expression. | ||
| 58 | |||
| 59 | ** Add an "indirect goto" byte-code and use it for local lambda expressions. | ||
| 60 | E.g. when you have code like | ||
| 61 | |||
| 62 | (let ((foo (lambda (x) bar))) | ||
| 63 | (dosomething | ||
| 64 | (funcall foo toto) | ||
| 65 | (blabla (funcall foo titi)))) | ||
| 66 | |||
| 67 | turn those `funcalls' into jumps and their return into indirect jumps back. | ||
| 68 | |||
| 69 | ** Compile efficiently local recursive functions | ||
| 70 | |||
| 71 | Similar to the previous point, we should be able to handle something like | ||
| 72 | |||
| 73 | (letrec ((loop () (blabla) (if (toto) (loop)))) | ||
| 74 | (loop)) | ||
| 75 | |||
| 76 | which ideally should generate the same byte-code as | ||
| 77 | |||
| 78 | (while (progn (blabla) (toto))) | ||
| 79 | |||
| 80 | * Things that were planned for Emacs-24 | ||
| 30 | 81 | ||
| 31 | ** concurrency: including it as an "experimental" compile-time option | 82 | ** concurrency: including it as an "experimental" compile-time option |
| 32 | sounds good. Of course there might still be big questions around | 83 | sounds good. Of course there might still be big questions around "which form |
| 33 | "which form of concurrency" we'll want. | 84 | of concurrency" we'll want. |
| 34 | ** Overhaul of customize: sounds wonderful. | ||
| 35 | ** better support for dynamic embedded graphics: I like this idea (my | 85 | ** better support for dynamic embedded graphics: I like this idea (my |
| 36 | mpc.el code could use it for the volume widget), though I wonder if the | 86 | mpc.el code could use it for the volume widget), though I wonder if the |
| 37 | resulting efficiency will be sufficient. | 87 | resulting efficiency will be sufficient. |
| @@ -43,10 +93,6 @@ is not always true. | |||
| 43 | ** Random things that cross my mind right now that I'd like to see (some of | 93 | ** Random things that cross my mind right now that I'd like to see (some of |
| 44 | them from my local hacks), but it's not obvious at all whether they'll | 94 | them from my local hacks), but it's not obvious at all whether they'll |
| 45 | make it. | 95 | make it. |
| 46 | *** multiple inheritance for keymaps (to get rid of the | ||
| 47 | fix_submap_inheritance hack and to more cleanly express the | ||
| 48 | relationship between minibuffer-local-*-map): I've had this locally | ||
| 49 | for a long time, but the details of the semantics is somewhat ... delicate. | ||
| 50 | *** prog-mode could/should provide a better fill-paragraph default | 96 | *** prog-mode could/should provide a better fill-paragraph default |
| 51 | that uses syntax-tables to recognize string/comment boundaries. | 97 | that uses syntax-tables to recognize string/comment boundaries. |
| 52 | *** provide more completion-at-point-functions. Make existing | 98 | *** provide more completion-at-point-functions. Make existing |
| @@ -102,8 +148,6 @@ I suggest totally rewriting that part of Flymake, using the simplest | |||
| 102 | mechanism that suffices for the specific needs. That will be easy | 148 | mechanism that suffices for the specific needs. That will be easy |
| 103 | for users to customize. | 149 | for users to customize. |
| 104 | 150 | ||
| 105 | ** Compute the list of active keymaps *after* reading the first event. | ||
| 106 | |||
| 107 | ** Distribute a bar cursor of width > 1 evenly between the two glyphs | 151 | ** Distribute a bar cursor of width > 1 evenly between the two glyphs |
| 108 | on each side of the bar (what to do at the edges?). | 152 | on each side of the bar (what to do at the edges?). |
| 109 | 153 | ||
| @@ -119,10 +163,6 @@ for users to customize. | |||
| 119 | It ought to be possible to omit text which is invisible (due to a | 163 | It ought to be possible to omit text which is invisible (due to a |
| 120 | text-property, overlay, or selective display) from the kill-ring. | 164 | text-property, overlay, or selective display) from the kill-ring. |
| 121 | 165 | ||
| 122 | ** Change the way define-minor-mode handles autoloading. | ||
| 123 | It should not generate :require. Or :require in defcustom | ||
| 124 | should not be recorded in the user's custom-set-variables call. | ||
| 125 | |||
| 126 | ** Feature to change cursor shape when Emacs is idle (for more than | 166 | ** Feature to change cursor shape when Emacs is idle (for more than |
| 127 | a specified time). | 167 | a specified time). |
| 128 | 168 | ||
| @@ -195,14 +235,63 @@ http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00515.html | |||
| 195 | processing. That is why we added text properties and variable | 235 | processing. That is why we added text properties and variable |
| 196 | width fonts. However, more features are still needed to achieve this. | 236 | width fonts. However, more features are still needed to achieve this. |
| 197 | 237 | ||
| 198 | ** Extended text-properties (to make overlays "obsolete") | 238 | ** Extend text-properties and overlays |
| 199 | *** Several text-property planes | 239 | *** Several text-property planes |
| 200 | This would get us rid of font-lock-face property (and I'd be happy to | 240 | This would get us rid of font-lock-face property (and I'd be happy to |
| 201 | get rid of char-property-alias-alist as well) since font-lock would | 241 | get rid of char-property-alias-alist as well) since font-lock would |
| 202 | simply use the `face' property in the `font-lock' plane. | 242 | simply use the `face' property in the `font-lock' plane. |
| 203 | Each property would come with an Elisp merge-function. The merge | 243 | |
| 204 | would be performed in add-text-properties. | 244 | Basically `put-text-property' and friends would take an extra argument PLANE |
| 205 | *** zero-width text-properties. | 245 | (maybe the best backward-compatible way to do that is to make it so that |
| 246 | PROPERTY can be a cons cell (PLANE . PROP)). So font-lock would | ||
| 247 | do (put-text-property start end '(font-lock . face) value). | ||
| 248 | |||
| 249 | All the properties coming from the various planes would get merged via an Elisp | ||
| 250 | function (so it can merge `face' differently than `keymap' or it could give | ||
| 251 | different priorities to different planes (we could imagine enabling/disabling | ||
| 252 | planes)). The merging would not happen lazily while looking up properties but | ||
| 253 | instead it would take place eagerly in `add-text-properties'. This is based on | ||
| 254 | the idea that it's much more frequent to lookup properties than to | ||
| 255 | modify them. Also, when properties are looked up during redisplay, we | ||
| 256 | generally can't run Elisp code, whereas we generally can do that when | ||
| 257 | properties are added. | ||
| 258 | |||
| 259 | *** Move overlays to intervals.c | ||
| 260 | |||
| 261 | Currently overlays are implemented as (two) sorted singly linked lists (one | ||
| 262 | for overlays_before some position and one for overlay_after that | ||
| 263 | position, for some quirky definition of "before" and "after"). | ||
| 264 | The function `overlay-recenter' changes the position used for the split | ||
| 265 | (and is called internally in various situations). | ||
| 266 | |||
| 267 | Each overlay is itself implemented with two markers (which keep track of | ||
| 268 | the overlay-start and overlay-end). Markers are implemented as | ||
| 269 | a non-sorted singly linked list of markers. So every text | ||
| 270 | insertion/deletion requires O(N) time, where N is the number of markers | ||
| 271 | since we have to go down that list to update those markers that are | ||
| 272 | affected by the modification. | ||
| 273 | |||
| 274 | You can start in src/buffer.[ch], maybe grepping for overlays_before for | ||
| 275 | a starting point. | ||
| 276 | |||
| 277 | Text-properties, OTOH, are implemented with a (mostly) balanced binary | ||
| 278 | tree. This is implemented in src/intervals.[ch]. | ||
| 279 | |||
| 280 | So we'd like to change overlays so that they don't use markers (and we | ||
| 281 | don't keep them in two sorted singly-linked lists) any more. Instead, | ||
| 282 | we'll store them inside the balanced binary tree used for | ||
| 283 | text-properties. I think we can use the "augmented tree" approach | ||
| 284 | described in https://en.wikipedia.org/wiki/Interval_tree. | ||
| 285 | |||
| 286 | To ease up debugging during development, I'd guess the implementation | ||
| 287 | would first add the new stuff, keeping the old stuff (i.e. add to | ||
| 288 | Lisp_Overlay whichever fields are needed for the new code, while keeping | ||
| 289 | the old ones, add needed overlay fields to the intervals tree, but keep | ||
| 290 | the old fields, the overlays_before etc...). This way, you can add | ||
| 291 | consistency checks that make sure the new code computes the same results | ||
| 292 | as the old code. And once that works well, we can remove the old code | ||
| 293 | and old fields. | ||
| 294 | |||
| 206 | ** Having tabs above a window to switch buffers in it. | 295 | ** Having tabs above a window to switch buffers in it. |
| 207 | 296 | ||
| 208 | ** "Perspectives" are named persistent window configurations. We have | 297 | ** "Perspectives" are named persistent window configurations. We have |
| @@ -1206,10 +1295,6 @@ systems for HTML/XML files automatically." | |||
| 1206 | ** Replace linum.el with nlinum.el | 1295 | ** Replace linum.el with nlinum.el |
| 1207 | http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00379.html | 1296 | http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00379.html |
| 1208 | 1297 | ||
| 1209 | ** Use pcomplete by default in shell-mode. | ||
| 1210 | This means to make it behave (by default) more like the current code. | ||
| 1211 | Use it also for read-shell-command, M-x compile, ... | ||
| 1212 | |||
| 1213 | ** Merge sendmail.el and messages.el. | 1298 | ** Merge sendmail.el and messages.el. |
| 1214 | Probably not a complete merge, but at least arrange for messages.el to be | 1299 | Probably not a complete merge, but at least arrange for messages.el to be |
| 1215 | a derived mode of sendmail.el. Or arrange for messages.el to be split | 1300 | a derived mode of sendmail.el. Or arrange for messages.el to be split |