소스 검색

Improved Buffer Layer Listing

Samuel W. Flint 8 년 전
부모
커밋
988fd62e93
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      buffer-layers.el

+ 6 - 3
buffer-layers.el

@@ -102,9 +102,12 @@
       (kill-buffer "*Buffer Layers*"))
     (with-current-buffer "*Buffer Layers*"
       (insert "Defined Buffer Layers:\n\n")
-      (dolist (layer *buffer-layers*)
-        (insert (format " - %s%s\n" layer (if (buffer-layer-applied-p layer) " (Applied)"
-                                            "")))))))
+      (insert (with-temp-buffer
+                (dolist (layer *buffer-layers*)
+                  (insert (format " - %s%s\n" layer (if (buffer-layer-applied-p layer) " (Applied)"
+                                                      ""))))
+                (sort-lines nil (buffer-end -1) (buffer-end +1))
+                (buffer-string))))))
 
 (defun unload-all-buffer-layers ()
   "Unload all loaded buffer layers."