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

Lines Matching +defs:file +defs:name

12 ;; This file is part of GNU Emacs.
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
58 ;; + All file buffers only appear in a file sub-menu, they will
120 ((not buffer-file-name)
136 ((and buffer-file-name
171 ;; Catchup for all non-file buffers
172 ((and (not buffer-file-name)
175 "Other non-file buffers (%d)")
176 ((and (string-match "/\\.[^/]*$" buffer-file-name)
220 other criteria are *not* tested and the buffer name will appear in the
290 (defcustom msb-max-file-menu-items 10
293 When the menu is of type `file by directory', this is the maximum
349 (defcustom msb-item-sort-function 'msb-sort-by-name
356 ITEM-NAME is the name of the item that will appear in the menu.
360 :type '(choice (const msb-sort-by-name)
395 *% <buffer-name>
399 (let ((name (buffer-name))
402 (format "%s%s %s" modified read-only name)))
411 (abbreviate-file-name (expand-file-name dired-directory)))
413 (abbreviate-file-name (expand-file-name (car dired-directory))))
416 (buffer-name)))))
421 *% <buffer-name>
425 (let ((name (msb--dired-directory))
428 (format "%s%s %s" modified read-only name)))
433 <buffer-name> *%# <file-name>
436 The `#' appears only version control file (SCCS/RCS)."
438 (buffer-name buffer)
442 (or buffer-file-name "")))
447 (defun msb-sort-by-name (item1 item2)
448 "Sort the items ITEM1 and ITEM2 by their `buffer-name'.
450 (string-lessp (buffer-name (cdr item1))
451 (buffer-name (cdr item2))))
455 "Sort the items ITEM1 and ITEM2 by directory name. Made for dired.
499 (and (> (length (buffer-name buffer)) 0)
500 (eq ?\s (aref (buffer-name buffer) 0))))
504 (file-name-directory (directory-file-name dir)))
507 ;; directory will be in the same item as the directory name.
509 (defun msb--init-file-alist (list)
518 (let ((file-name (expand-file-name
519 (buffer-file-name buffer))))
520 (when file-name
521 (list (cons (msb--strip-dir file-name) buffer)))))
525 ;; Now clump buffers together that have the same directory name
555 (abbreviate-file-name dir) number-of-items))
558 (defvar msb--choose-file-menu-list)
559 (defvar msb--choose-file-menu-arg-list)
561 (defun msb--choose-file-menu (list)
562 "Choose file-menu with respect to directory for every buffer in LIST."
563 (setq msb--choose-file-menu-arg-list list)
564 (let ((buffer-alist (msb--init-file-alist list))
566 (max-clumped-together (if (numberp msb-max-file-menu-items)
567 msb-max-file-menu-items
577 (setq msb--choose-file-menu-list (copy-sequence rest))
579 ;; similar name. Remember that buffer-alist is sorted based on the
580 ;; directory name of the buffers' visited files.
593 ;; on the systems with case-insensitive file names.
624 ;; one step in the file hierarchy.
626 ;; at the machine name component of an ange-ftp filename.
642 ;; We have reached the same place in the file hierarchy as
728 (defun msb--add-to-menu (buffer function-info max-buffer-name-length)
737 max-buffer-name-length)
741 (defsubst msb--choose-menu (buffer function-info-vector max-buffer-name-length)
752 (msb--add-to-menu buffer info max-buffer-name-length)))
757 (buffer-name buffer)))
790 (string< (symbol-name item1) (symbol-name item2))))
838 (push (cons major-mode mode-name)
844 (defun msb--most-recently-used-menu (max-buffer-name-length)
861 max-buffer-name-length)
872 (let ((max-buffer-name-length 0)
873 file-buffers
875 ;; Calculate the longest buffer name.
879 (setq max-buffer-name-length
880 (max max-buffer-name-length (length (buffer-name buffer))))))
898 (buffer-file-name buffer)
901 ;; (buffer-file-name buffer)))
903 (push buffer file-buffers))
907 max-buffer-name-length))))
908 (when file-buffers
909 (setq file-buffers
920 max-buffer-name-length))
926 (msb--choose-file-menu file-buffers))))
930 (msb--most-recently-used-menu max-buffer-name-length))
931 (others (nconc file-buffers
975 ;; because this file redefines menu-bar-update-buffers.
1049 sub-name
1055 (setq sub-name (concat (car (car tmp-list)) "..."))
1056 (push (nconc (list mcount sub-name
1057 'keymap sub-name)
1064 (let (sub-name)
1065 (setq sub-name (concat (car (car list)) "..."))
1066 (push (nconc (list mcount sub-name 'keymap sub-name)
1087 (cons (buffer-name (cdr item))
1122 (list (frame-parameter frame 'name)
1123 (frame-parameter frame 'name)