aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-04-29 15:37:08 +0200
committerLars Ingebrigtsen2016-04-29 15:37:08 +0200
commite4c7657b0d1a31d64ca24bc64b5480cd7687e332 (patch)
treebdff6b942abc75636a13b139e72cfd1e0a87bb89
parentfb685bc91a72508c97ce7e30f970d4157677f371 (diff)
downloademacs-e4c7657b0d1a31d64ca24bc64b5480cd7687e332.tar.gz
emacs-e4c7657b0d1a31d64ca24bc64b5480cd7687e332.zip
find-lisp doc touchups
* lisp/find-lisp.el (find-lisp-format): Copy over the doc string (bug#15047). (find-lisp-find-files): Clarify doc.
-rw-r--r--lisp/find-lisp.el16
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el
index 475001f5707..8591eb841c1 100644
--- a/lisp/find-lisp.el
+++ b/lisp/find-lisp.el
@@ -118,7 +118,7 @@ Argument DIR is the directory containing FILE."
118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 118;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
119 119
120(defun find-lisp-find-files (directory regexp) 120(defun find-lisp-find-files (directory regexp)
121 "Find files in DIRECTORY which match REGEXP." 121 "Find files under DIRECTORY, recursively, that match REGEXP."
122 (let ((file-predicate 'find-lisp-default-file-predicate) 122 (let ((file-predicate 'find-lisp-default-file-predicate)
123 (directory-predicate 'find-lisp-default-directory-predicate) 123 (directory-predicate 'find-lisp-default-directory-predicate)
124 (find-lisp-regexp regexp)) 124 (find-lisp-regexp regexp))
@@ -297,6 +297,9 @@ It is a function which takes two arguments, the directory and its parent."
297;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 297;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
298 298
299(defun find-lisp-format (file-name file-attr switches now) 299(defun find-lisp-format (file-name file-attr switches now)
300 "Format one line of long ls output for file FILE-NAME.
301FILE-ATTR and FILE-SIZE give the file's attributes and size.
302SWITCHES and TIME-INDEX give the full switch list and time data."
300 (let ((file-type (nth 0 file-attr))) 303 (let ((file-type (nth 0 file-attr)))
301 (concat (if (memq ?i switches) ; inode number 304 (concat (if (memq ?i switches) ; inode number
302 (format "%6d " (nth 10 file-attr))) 305 (format "%6d " (nth 10 file-attr)))
@@ -325,7 +328,7 @@ It is a function which takes two arguments, the directory and its parent."
325 "\n"))) 328 "\n")))
326 329
327(defun find-lisp-time-index (switches) 330(defun find-lisp-time-index (switches)
328 ;; Return index into file-attributes according to ls SWITCHES. 331 "Return index into file-attributes according to ls SWITCHES."
329 (cond 332 (cond
330 ((memq ?c switches) 6) ; last mode change 333 ((memq ?c switches) 6) ; last mode change
331 ((memq ?u switches) 4) ; last access 334 ((memq ?u switches) 4) ; last access
@@ -333,10 +336,11 @@ It is a function which takes two arguments, the directory and its parent."
333 (t 5))) 336 (t 5)))
334 337
335(defun find-lisp-format-time (file-attr switches now) 338(defun find-lisp-format-time (file-attr switches now)
336 ;; Format time string for file with attributes FILE-ATTR according 339 "Format time string for file.
337 ;; to SWITCHES (a list of ls option letters of which c and u are recognized). 340This is done with attributes FILE-ATTR according to SWITCHES (a
338 ;; Use the same method as `ls' to decide whether to show time-of-day or year, 341list of ls option letters of which c and u are recognized). Use
339 ;; depending on distance between file date and NOW. 342the same method as \"ls\" to decide whether to show time-of-day or
343year, depending on distance between file date and NOW."
340 (let* ((time (nth (find-lisp-time-index switches) file-attr)) 344 (let* ((time (nth (find-lisp-time-index switches) file-attr))
341 (diff16 (- (car time) (car now))) 345 (diff16 (- (car time) (car now)))
342 (diff (+ (ash diff16 16) (- (car (cdr time)) (car (cdr now))))) 346 (diff (+ (ash diff16 16) (- (car (cdr time)) (car (cdr now)))))