diff options
author | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:35:46 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:35:46 +0800 |
commit | a681e7f368cfd9294841b11d89bbe624b859272a (patch) | |
tree | 597188e46ffacaf5333cdaeecb5dc9359d42e2c7 /common.el | |
parent | b947f76e79cffc2bbeda2bbf41605b9ed97d8a0b (diff) |
ibuffer: Try to re-invent the wheel of exporting buffers to ibuffer.
Diffstat (limited to 'common.el')
-rw-r--r-- | common.el | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -474,6 +474,18 @@ If the length of LS is less than N, then return the whole LS." ((setq i n)))) (reverse result))))) +;;; A helper function to remove the last non-cons-cell `cdr'. + +(defun remove-last-non-nil-cdr (arg) + "Remove the last `cdr' that is not a cons cell." + (let ((temp arg)) + (while (consp temp) + (cond + ((consp (cdr temp))) + ((setcdr temp nil))) + (setq temp (cdr temp)))) + arg) + (provide 'common) ;;; common.el ends here. |