• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/play/

Lines Matching defs:layout

134 (defvar gametree-local-layout nil
135 "A list encoding the layout (i.e. the show or hide state) of the file.
140 `enable-local-variables'), and the layout will be set accordingly.")
253 ;;;; outline layout
272 (defun gametree-current-layout (depth &optional top-level)
273 (let ((layout nil) (first-time t))
287 (setq layout
288 (nconc layout
292 (setq layout (nconc layout (if (gametree-entry-shown-p)
295 (let ((sub-layout
296 (gametree-current-layout (gametree-current-branch-depth))))
297 (setq layout (nconc layout (list sub-layout))))))
298 layout))
300 (defun gametree-save-layout ()
303 (setq gametree-local-layout (gametree-current-layout 0 t))))
305 (defun gametree-apply-layout (layout depth &optional top-level)
307 (while (and layout
321 (if (nth 0 layout)
322 (funcall (nth 0 layout)))
323 (if (not (and (nth 1 layout) (listp (nth 1 layout))))
324 (setq layout (cdr layout))
325 (gametree-apply-layout (nth 1 layout)
327 (setq layout (cdr (cdr layout)))))))
329 (defun gametree-restore-layout ()
332 (gametree-apply-layout gametree-local-layout 0 t)))
334 (defun gametree-hack-file-layout ()
337 (if (looking-at "[^\n]*-\*-[^\n]*gametree-local-layout: \\([^;\n]*\\);")
342 (princ gametree-local-layout))))))
545 (defun gametree-layout-to-register (register)
546 "Store current tree layout in register REGISTER.
547 Use \\[gametree-apply-register-layout] to restore that configuration.
553 (gametree-current-layout 0 t))))
555 (defun gametree-apply-register-layout (char)
556 "Return to a tree layout stored in a register.
558 (interactive "*cApply layout from register: ")
561 (gametree-apply-layout (get-register char) 0 t)))
563 (defun gametree-save-and-hack-layout ()
564 "Save the current tree layout and hack the file local variable spec.
565 This function saves the current layout in `gametree-local-layout' and,
568 `gametree-local-layout' for more information."
570 (gametree-save-layout)
572 (gametree-hack-file-layout))
583 (add-hook 'write-contents-hooks 'gametree-save-and-hack-layout))
590 (define-key gametree-mode-map "\C-c\C-r " 'gametree-layout-to-register)
591 (define-key gametree-mode-map "\C-c\C-r/" 'gametree-layout-to-register)
592 (define-key gametree-mode-map "\C-c\C-rj" 'gametree-apply-register-layout)
593 (define-key gametree-mode-map "\C-c\C-y" 'gametree-save-and-hack-layout)