?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/ls-lisp.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:12:51 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/ls-lisp.el ;;; in Emacs version 24.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (custom-declare-group 'ls-lisp nil "Emulate the ls program completely in Emacs Lisp." :version "21.1" :group 'dired) #@63 Reset the ls-lisp options that depend on `ls-lisp-emulation'. (defalias 'ls-lisp-set-options #[nil "\300\301\302\"\207" [mapc custom-reevaluate-setting (ls-lisp-ignore-case ls-lisp-dirs-first ls-lisp-verbosity)] 3 (#$ . 665)]) (byte-code "\302\303\304\305\306\307\310\311\312\313\314\315&\210\316\317\320\321#\210\322\321\211\203; @\317N\2034 \320N\2044 \323\320\317N#\210 A\211\204 *\324\317\320\325#\210\302\320\326\327\330\331\306\332\314\315& \210\302\333\334\335\330\336\306\332\314\315& \210\302\337\340\341\330\342\306\343\314\315& \210\302\344\345\346\306\332\314\315&\210\302\347\350\351\306\332\314\315&\210\302\352\353\354\306\355\314\315&\210\302\356\321\357\306\332\314\315&\207" [prop --dolist-tail-- custom-declare-variable ls-lisp-emulation (cond ((memq system-type '(hpux usg-unix-v irix berkeley-unix)) 'UNIX)) "Platform to emulate: GNU (default), MacOS, MS-Windows, UNIX.\nCorresponding value is one of: nil, `MacOS', `MS-Windows', `UNIX'.\nSet this to your preferred value; it need not match the actual platform\nyou are using.\n\nThis variable does not affect the behavior of ls-lisp directly.\nRather, it controls the default values for some variables that do:\n`ls-lisp-ignore-case', `ls-lisp-dirs-first', and `ls-lisp-verbosity'.\n\nIf you change this variable directly (without using customize)\nafter loading `ls-lisp', you should use `ls-lisp-set-options' to\nupdate the dependent variables." :type (choice (const :tag "GNU" nil) (const MacOS) (const MS-Windows) (const UNIX)) :initialize custom-initialize-default :set #[(symbol value) "\302 !\232?\205 \303 \"\210\304 \207" [value symbol eval custom-set-default ls-lisp-set-options] 3] :group ls-lisp defvaralias ls-lisp-dired-ignore-case ls-lisp-ignore-case nil (saved-value saved-variable-comment) put make-obsolete-variable "21.1" (memq ls-lisp-emulation '(MS-Windows MacOS)) "Non-nil causes ls-lisp alphabetic sorting to ignore case." :set-after (ls-lisp-emulation) boolean ls-lisp-dirs-first (eq ls-lisp-emulation 'MS-Windows) "Non-nil causes ls-lisp to sort directories first in any ordering.\n(Or last if it is reversed.) Follows Microsoft Windows Explorer." (ls-lisp-emulation) ls-lisp-verbosity (cond ((eq ls-lisp-emulation 'MacOS) nil) ((eq ls-lisp-emulation 'MS-Windows) (if (and (fboundp 'w32-using-nt) (w32-using-nt)) '(links))) ((eq ls-lisp-emulation 'UNIX) '(links uid)) (t '(links uid gid))) "A list of optional file attributes that ls-lisp should display.\nIt should contain none or more of the symbols: links, uid, gid.\nA value of nil (or an empty list) means display none of them.\n\nConcepts come from UNIX: `links' means count of names associated with\nthe file; `uid' means user (owner) identifier; `gid' means group\nidentifier.\n\nIf emulation is MacOS then default is nil;\nif emulation is MS-Windows then default is `(links)' if platform is\nWindows NT/2K, nil otherwise;\nif emulation is UNIX then default is `(links uid)';\nif emulation is GNU then default is `(links uid gid)'." (ls-lisp-emulation) (set (const :tag "Show Link Count" links) (const :tag "Show User" uid) (const :tag "Show Group" gid)) ls-lisp-use-insert-directory-program (not (memq system-type '(ms-dos windows-nt))) "Non-nil causes ls-lisp to revert back to using `insert-directory-program'.\nThis is useful on platforms where ls-lisp is dumped into Emacs, such as\nMicrosoft Windows, but you would still like to use a program to list\nthe contents of a directory." ls-lisp-support-shell-wildcards t "Non-nil means ls-lisp treats file patterns as shell wildcards.\nOtherwise they are treated as Emacs regexps (for backward compatibility)." ls-lisp-format-time-list '("%b %e %H:%M" "%b %e %Y") "List of `format-time-string' specs to display file time stamps.\nThese specs are used ONLY if a valid locale can not be determined.\n\nIf `ls-lisp-use-localized-time-format' is non-nil, these specs are used\nregardless of whether the locale can be determined.\n\nSyntax: (EARLY-TIME-FORMAT OLD-TIME-FORMAT)\n\nThe EARLY-TIME-FORMAT is used if file has been modified within the\ncurrent year. The OLD-TIME-FORMAT is used for older files. To use ISO\n8601 dates, you could set:\n\n(setq ls-lisp-format-time-list\n '(\"%Y-%m-%d %H:%M\"\n \"%Y-%m-%d \"))" (list (string :tag "Early time format") (string :tag "Old time format")) ls-lisp-use-localized-time-format "Non-nil means to always use `ls-lisp-format-time-list' for time stamps.\nThis applies even if a valid locale is specified.\n\nWARNING: Using localized date/time format might cause Dired columns\nto fail to line up, e.g. if month names are not all of the same length."] 13) #@68 This holds the original function definition of `insert-directory'. (defvar original-insert-directory nil (#$ . 5317)) #@33 Format to display integer UIDs. (defvar ls-lisp-uid-d-fmt "-%d" (#$ . 5441)) #@31 Format to display user names. (defvar ls-lisp-uid-s-fmt "-%s" (#$ . 5524)) #@33 Format to display integer GIDs. (defvar ls-lisp-gid-d-fmt "-%d" (#$ . 5605)) #@37 Format to display user group names. (defvar ls-lisp-gid-s-fmt "-%s" (#$ . 5688)) #@39 Format to display integer file sizes. (defvar ls-lisp-filesize-d-fmt "%d" (#$ . 5775)) #@37 Format to display float file sizes. (defvar ls-lisp-filesize-f-fmt "%.0f" (#$ . 5868)) (byte-code "\301\302!\204 \303K\301\207" [original-insert-directory featurep ls-lisp insert-directory] 2) #@1216 Insert directory listing for FILE, formatted according to SWITCHES. Leaves point after the inserted text. SWITCHES may be a string of options, or a list of strings. Optional third arg WILDCARD means treat FILE as shell wildcard. Optional fourth arg FULL-DIRECTORY-P means file is a directory and switches do not contain `d', so that a full listing is expected. This version of the function comes from `ls-lisp.el'. If the value of `ls-lisp-use-insert-directory-program' is non-nil then it works exactly like the version from `files.el' and runs a directory listing program whose name is in the variable `insert-directory-program'; if also WILDCARD is non-nil then it runs the shell specified by `shell-file-name'. If the value of `ls-lisp-use-insert-directory-program' is nil then it runs a Lisp emulation. The Lisp emulation does not run any external programs or shells. It supports ordinary shell wildcards if `ls-lisp-support-shell-wildcards' is non-nil; otherwise, it interprets wildcards as regular expressions to match file names. It does not support all `ls' switches -- those that work are: A a B C c F G g h i n R r S s t U u X. The l switch is assumed to be always present and cannot be turned off. (defalias 'insert-directory #[(file switches &optional wildcard full-directory-p) "\203 \n\f $\207\306\307\n!\310\"\n\311%&\211'\203( '\310\n\f %\202\264 \312\313\"\2036 \314\315\311\211$\316\317\316\320\321\311\"\"\"(\203f \312\322\n\"\203f \323\n!\204f \n\211GSH\324=\203d \n\325\nGSO\326\f\203\203 (\203w \327\330\n!!\202z \330\n!%\331\n!\202\214 \332>\203\214 \333%\334\335\336\217\210\212eb\210\337\340\311\326#\205\263 \341\342!\211)\205\262 \314\343!\210\311\210\344)\261))+\207" [ls-lisp-use-insert-directory-program original-insert-directory file switches wildcard full-directory-p find-file-name-handler expand-file-name insert-directory nil string-match "--dired " replace-match "" delete 32 45 append "[[?*]" file-exists-p 47 0 t wildcard-to-regexp file-name-nondirectory file-name-directory 66 "[^~]\\'" err (byte-code "\304 \305 !\n%\207" [file switches wildcard-regexp full-directory-p ls-lisp-insert-directory ls-lisp-time-index] 6) ((invalid-regexp (byte-code "\211A@)\306\232\203% \307\n>\205 \310\311\f!\312 \n\313\n!\314%\210\202, \315@A\"\210\314\207" [err x switches wildcard-regexp orig-file file "Unmatched [ or [^" 66 "[^~]\\'" file-relative-name ls-lisp-insert-directory ls-lisp-time-index nil signal full-directory-p] 7))) re-search-forward "^total" get-free-disk-space "." "total used in directory" " available " wildcard-regexp orig-file handler ls-lisp-support-shell-wildcards available] 8 (#$ . 6071)]) #@528 Insert directory listing for FILE, formatted according to SWITCHES. Leaves point after the inserted text. This is an internal function optionally called by the `ls-lisp.el' version of `insert-directory'. It is called recursively if the -R switch is used. SWITCHES is a *list* of characters. TIME-INDEX is the time index into file-attributes according to SWITCHES. WILDCARD-REGEXP is nil or an *Emacs regexp*. FULL-DIRECTORY-P means file is a directory and SWITCHES does not contain `d', so that a full listing is expected. (defalias 'ls-lisp-insert-directory #[(file switches time-index wildcard-regexp full-directory-p) "\204 \203%\306\n!\211\307\310\311\312 >\203 \313\202 \314%>\315\211?@\315\211AB\310\211CD\310\211EF\310\211GH\310\211IJ\310\211KL\316>!>\317 >\203a \320\321>\">\202n \322 >\204n \320\323>\">\324> \">\325 >\203\203 \326>!\210\202\333`>\242BC>\310E\211M\203M@\211EAH\327H8\211I;\203\260 \330I!\202\266 \331\332I\"GK\333H8\211J;\203\312 \330J!\202\320 \331\332J\"GL\334H8GK@V\203\344 K@LAV\203\360 LAGBV\203\374 GBMA\211M\204\225 *\331\335@\"N\331\336@\"O\331\335A\"P\331\336A\"Q\331\337\340 >\2037\331\341\342B\343\245!\"G\202=\331\341B\"G\"R\331\344\340 >\203U\331\341\342B\345\245!\"G\202[\331\341B\"G\"S>DD\203\300D@EDADE@FEAH\334H8GH\203bG?\346GZW\204\240\347?!\204\240\347G!\203\245?\202\251\350?!\\\211?\203b\351FHG T%c\210\202b\212C@b\210CA\204\317\352c\210\331\353\342?\354\245!\"c\210)\355 >\205\">\205\">@E>A>E\211UA@)\311=\203\341\356\357E@\"\204\341\360E@\"E\361E\362\261\210\363E T %\210\202\341.\207\364\n!\203/\360\n!\n\211GSH\365=\203>\n\315\366O\367\n\314\"\211V\203f\351\370 >\203W\371\nV\"\202X\nV\334V8 T%c\202q\372\373\n\"\210\374 \210\375\327!)\207" [wildcard-regexp full-directory-p file dir default-directory switches file-name-as-directory directory-files-and-attributes nil t 110 integer string 0 ls-lisp-sanitize 65 ls-lisp-delete-matching "^\\.\\.?$" 97 "^\\." ls-lisp-handle-switches 67 ls-lisp-column-format 2 string-width format "%d" 3 7 " %%-%dd" " %%-%ds" " %%%dd" 115 "%.0f" fceiling 1024.0 " %%%d.0f" 1024.0 134217727 floatp float ls-lisp-format "(No match)\n" "total %.0f\n" 1024.0 82 string-match "\\`\\.\\.?/?\\'" expand-file-name "\n" ":\n" ls-lisp-insert-directory file-name-absolute-p 47 -1 file-attributes 70 ls-lisp-classify-file message "%s: doesn't exist or is inaccessible" ding sit-for file-alist sum max-uid-len max-gid-len max-file-size total-line files elt short file-size attr fuid fgid uid-len gid-len --dolist-tail-- ls-lisp-uid-d-fmt ls-lisp-uid-s-fmt ls-lisp-gid-d-fmt ls-lisp-gid-s-fmt ls-lisp-filesize-d-fmt ls-lisp-filesize-f-fmt time-index x fattr] 8 (#$ . 8764)]) #@511 Sanitize the elements in FILE-ALIST. Fixes any elements in the alist for directory entries whose file attributes are nil (meaning that `file-attributes' failed for them). This is known to happen for some network shares, in particular for the ".." directory entry. If the ".." directory entry has nil attributes, the attributes are copied from the "." entry, if they are non-nil. Otherwise, the offending element is removed from the list, as are any elements for other directory entries with nil attributes. (defalias 'ls-lisp-sanitize #[(file-alist) "\301\302\"A\204 \301\303\"A\203 \301\302\"\301\303\"A\241\210\304\305\"\207" [file-alist assoc ".." "." rassq-delete-all nil] 4 (#$ . 11581)]) #@183 Insert the file names (only) in FILE-ALIST into the current buffer. Format in columns, sorted vertically, following GNU ls -C. Responds to the window width as ls should but may not! (defalias 'ls-lisp-column-format #[(file-alist) "\306\211\211\211\307\211\306\211\203>