%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/ls-lisp.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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 #[0 "\300\301\302\"\207" [mapc custom-reevaluate-setting (ls-lisp-ignore-case ls-lisp-dirs-first ls-lisp-verbosity)] 3 (#$ . 525)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315&\210\316\317\320\321#\210\322\211\203; \211@\317N\2034 \320N\2044 \323\320\317N#\210A\266\202\202 \210\324\317\320\325#\210\300\320\302\303\326DD\327\330\331\306\332\314\315& \210\300\333\302\303\334DD\335\336\337\330\340\306\332\314\315&\210\300\341\302\303\342DD\343\336\337\306\332\314\315& \210\300\344\302\303\345DD\346\330\347\306\332\314\315& \210\300\350\302\303\351DD\352\330\353\306\354\314\315& \210\300\355\302\303\356DD\357\306\332\314\315&\210\300\360\302\303\361DD\362\306\332\314\315&\210\300\363\302\303\364DD\365\306\366\314\315&\210\300\367\302\303\370DD\371\306\332\314\315&\207" [custom-declare-variable ls-lisp-emulation funcall function #[0 "\301>\205 \302\207" [system-type (hpux usg-unix-v berkeley-unix) UNIX] 2] "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 #[514 "\211\300!\232?\205 \301\"\210\302 \207" [eval custom-set-default ls-lisp-set-options] 5 "\n\n(fn SYMBOL VALUE)"] :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" #[0 "\301>\207" [ls-lisp-emulation (MS-Windows MacOS)] 2] "Non-nil causes ls-lisp alphabetic sorting to ignore case." :set-after (ls-lisp-emulation) boolean ls-lisp-use-string-collate #[0 "\301>\203 \302\207\303\207" [ls-lisp-emulation (MacOS UNIX) nil t] 2] "Non-nil causes ls-lisp to sort files in locale-dependent collation order.\n\nA value of nil means use ordinary string comparison (see `compare-strings')\nfor sorting files. A non-nil value uses `string-collate-lessp' instead,\nwhich more closely emulates what GNU `ls' does.\n\nOn GNU/Linux systems, if the locale's codeset specifies UTF-8, as\nin \"en_US.UTF-8\", the collation order follows the Unicode\nCollation Algorithm (UCA), which places together file names that\ndiffer only in punctuation characters. On MS-Windows, customize\nthe option `ls-lisp-UCA-like-collation' to a non-nil value to get\nsimilar behavior." :version "25.1" (ls-lisp-emulation) ls-lisp-UCA-like-collation #[0 "\300\207" [t] 1] "Non-nil means force ls-lisp use a collation order compatible with UCA.\n\nUCA is the Unicode Collation Algorithm. GNU/Linux systems automatically\nfollow it in their string-collation routines if the locale specifies\nUTF-8 as its codeset. On MS-Windows, customize this option to a non-nil\nvalue to get similar behavior.\n\nWhen this option is non-nil, and `ls-lisp-use-string-collate' is also\nnon-nil, the collation order produced on MS-Windows will ignore\npunctuation and symbol characters, which will, for example, place\n`.foo' near `foo'. See the documentation of `string-collate-lessp'\nand `w32-collate-ignore-punctuation' for more details.\n\nThis option is ignored on platforms other than MS-Windows; to\ncontrol the collation ordering of the file names on those other\nsystems, set your locale instead." ls-lisp-dirs-first #[0 "\301=\207" [ls-lisp-emulation MS-Windows] 2] "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 #[0 "\301\267\202 \302\207\303\304!\205 \304 \205 \305\207\306\207\307\207" [ls-lisp-emulation #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (MacOS 6 MS-Windows 8 UNIX 21)) nil fboundp w32-using-nt (links) (links uid) (links uid gid)] 2] "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 #[0 "\301>?\207" [system-type (ms-dos windows-nt)] 2] "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 #[0 "\300\207" [t] 1] "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 #[0 "\300\207" [("%b %e %H:%M" "%b %e %Y")] 1] "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 #[0 "\300\207" [nil] 1] "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."] 12) #@33 Format to display integer UIDs. (defvar ls-lisp-uid-d-fmt " %d" (#$ . 7202)) #@31 Format to display user names. (defvar ls-lisp-uid-s-fmt " %s" (#$ . 7285)) #@33 Format to display integer GIDs. (defvar ls-lisp-gid-d-fmt " %d" (#$ . 7366)) #@37 Format to display user group names. (defvar ls-lisp-gid-s-fmt " %s" (#$ . 7449)) #@39 Format to display integer file sizes. (defvar ls-lisp-filesize-d-fmt " %d" (#$ . 7536)) #@37 Format to display float file sizes. (defvar ls-lisp-filesize-f-fmt " %.0f" (#$ . 7630)) #@61 Format to display file sizes in blocks (for the -s switch). (defvar ls-lisp-filesize-b-fmt " %.0f" (#$ . 7724)) #@1164 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 this advice just delegates the work to ORIG-FUN (the normal `insert-directory' function from `files.el'). But 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 v X. The l switch is assumed to be always present and cannot be turned off. (fn ORIG-FUN FILE SWITCHES &optional WILDCARD FULL-DIRECTORY-P) (defalias 'ls-lisp--insert-directory #[1283 "\203 $\207\302\303!\304\"\305\203% \304%\202\377 \306\307\"\2036 \310\311\305\211 $\262\312\313\312\314\315\n\305\"\"\"\262 \203o \306\316\"\203o \317!\204o \211GSH\320=\203l \321\322 GS#\262\323\262\203\217 \203\200 \324\325!!\202\204 \325!\262\326!\262\202\231 \327>\203\231 \330\262\3311\256 \332\333 !%0\202\335 \211A@\334\232\203\325 \327>\205\276 \330\262\335!\262\332\333\n!\305 %\202\333 \336@A\"\262\210\212eb\210\337\340\305\323#\205\376 \341\342!\211\205\374 \310\343!\210\305\210\344\261\262)\207" [ls-lisp-use-insert-directory-program ls-lisp-support-shell-wildcards find-file-name-handler expand-file-name insert-directory nil string-match "--dired " replace-match "" delete 32 45 append "[[?*]" file-exists-p 47 substring 0 t wildcard-to-regexp file-name-nondirectory file-name-directory 66 "[^~]\\'" (invalid-regexp) ls-lisp-insert-directory ls-lisp-time-index "Unmatched [ or [^" file-relative-name signal re-search-forward "^total" get-free-disk-space "." "total used in directory" " available "] 15 (#$ . 7844)]) (advice-add 'insert-directory :around 'ls-lisp--insert-directory) #@592 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. (fn FILE SWITCHES TIME-INDEX WILDCARD-REGEXP FULL-DIRECTORY-P) (defalias 'ls-lisp-insert-directory #[1285 "\203\n \306\230\203 \211\203\340\307!\211\310\311\312\313\n>\203# \314\202$ \315%\316\211\211\211\311\211\211\211\211\211\211\211\211\211\317!\262\320>\203J \321\322\"\262\202X \323>\204X \321\324\"\262\325\"\262\326>\203o \327!\210\202\216`\242B\262\n\211\203\353 \211@\211A\262\3308\262\262;\203\227 \331!\202\235 \332\333\"G\262\3348\262\262;\203\263 \331!\202\271 \332\333\"G\262\3358\262\262V\203\316 \262V\203\330 \262 V\203\344 \262 A\266\202\202x \210\332\336\"\332\337\"\332\336 \"\332\337 \"\332\340\332\341\"G\"\332\342\332\341\"G\"=\343>\203/\332\344\332\341\345\346\245!\"G\">\262 \203s@\262A\262 @\262A\262\3358\262\262\2033\\\211\262\2033\347%c\210\2023\212 @b\210 A\204\202\350c\210\332\351\345\352\245!\"c\210)\204\226db\210\353>\205\336\205\336@\262A\262A@\312=\203\235\354\355 @\"\204\235\356@\"\262\357\360\261\210\361%\210\202\235)\207\362!\203\353\356!\262\211GSH\363=\203\374\364\316\365#\262\366\315\"\211\203&\347\367>\203\370\"\202\211\3358\262%c\202.\371\372\373\374 E\"\207" [default-directory 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 "[^~]\\'" 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" "%.0f" " %%%d.0f" 115 "%%%d.0f " fceiling 1024.0 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 substring -1 file-attributes 70 ls-lisp-classify-file signal file-error "Reading directory" "Directory doesn't exist or is inaccessible" ls-lisp-filesize-f-fmt ls-lisp-filesize-b-fmt] 28 (#$ . 10232)]) #@48 (fn ORIG-FUN DIR-OR-LIST &optional SWITCHES) (defalias 'ls-lisp--dired #[770 "\204 \262:\203 \"\207\302\303!!\211\204! \"\202a \211@\304A!@\203[ \305\306C\244\205>