Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103466. ------------------------------------------------------------ revno: 103466 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 20:26:38 -0800 message: * lisp/files: Fix comment typo. diff: === modified file 'lisp/files.el' --- lisp/files.el 2011-03-01 03:43:14 +0000 +++ lisp/files.el 2011-03-01 04:26:38 +0000 @@ -3400,7 +3400,7 @@ (progn (setq alist (delq subdirs alist)) (cdr-safe subdirs)) - ;; TODO someone might want to extent this to allow + ;; TODO someone might want to extend this to allow ;; integer values for subdir, where N means ;; variables apply to this directory and N levels ;; below it (0 == nil). ------------------------------------------------------------ revno: 103465 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 20:20:37 -0800 message: Remove some duplicated tramp ChangeLog entries. I guess the same changes were applied to emacs-23 and trunk separately. More duplicates remain. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:59:31 +0000 +++ lisp/ChangeLog 2011-03-01 04:20:37 +0000 @@ -7410,48 +7410,6 @@ * whitespace.el (whitespace-style): Adjust type declaration. -2010-08-26 Magnus Henoch - - * net/tramp-gvfs.el (tramp-gvfs-handle-copy-file): Do not pass - empty argument to gvfs-copy. - -2010-08-26 Chong Yidong - - * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to - handle new TRASH arg of `delete-file'. - -2010-08-26 Christian Lynbech (tiny change) - - * net/tramp.el (tramp-handle-insert-directory): Don't use - `forward-word', its default syntax could be changed. - -2010-08-26 Toru TSUNEYOSHI - Michael Albinus - - Implement compression for inline methods. - - * net/tramp.el (tramp-inline-compress-start-size): New defcustom. - (tramp-copy-size-limit): Allow also nil. - (tramp-inline-compress-commands): New defconst. - (tramp-find-inline-compress, tramp-get-inline-compress) - (tramp-get-inline-coding): New defuns. - (tramp-get-remote-coding, tramp-get-local-coding): Remove, - replaced by `tramp-get-inline-coding'. - (tramp-handle-file-local-copy, tramp-handle-write-region) - (tramp-method-out-of-band-p): Use `tramp-get-inline-coding'. - -2010-08-26 Noah Lavine (tiny change) - - Detect ssh 'ControlMaster' argument automatically in some cases. - - * net/tramp.el (tramp-detect-ssh-controlmaster): New defun. - (tramp-default-method): Use it. - -2010-08-26 Karel Klíč - - * net/tramp.el (tramp-file-name-for-operation): - Add file-selinux-context. - 2010-08-26 Łukasz Stelmach (tiny change) * play/cookie1.el (read-cookie): Fix off-by-one error (bug#6921). ------------------------------------------------------------ revno: 103464 committer: Christoph Scholtes branch nick: trunk timestamp: Mon 2011-02-28 21:14:00 -0700 message: * maintaining.texi (Format of ChangeLog): Add reference to add-log-full-name. (Change Log Commands): Add documentation for combining multiple symbols in one change. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-03-01 03:05:28 +0000 +++ doc/emacs/ChangeLog 2011-03-01 04:14:00 +0000 @@ -1,3 +1,10 @@ +2011-03-01 Christoph Scholtes + + * maintaining.texi (Format of ChangeLog): Add reference to + add-log-full-name. + (Change Log Commands): Add documentation for combining multiple + symbols in one change. + 2011-03-01 Glenn Morris * custom.texi (Directory Variables): === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2011-02-05 22:30:14 +0000 +++ doc/emacs/maintaining.texi 2011-03-01 04:14:00 +0000 @@ -1486,6 +1486,10 @@ non-@code{nil}, @kbd{C-x 4 a} adds to any existing item for the file rather than starting a new item. +You can combine multiple changes of the same nature. If you don't +enter any text after the initial @kbd{C-x 4 a}, any subsequent +@kbd{C-x 4 a} adds another symbol to the change. + @vindex add-log-always-start-new-record If @code{add-log-always-start-new-record} is non-@code{nil}, @kbd{C-x 4 a} always makes a new entry, even if the last entry @@ -1535,13 +1539,14 @@ @node Format of ChangeLog @subsection Format of ChangeLog - A change log entry starts with a header line that contains the current -date, your name, and your email address (taken from the variable -@code{add-log-mailing-address}). Aside from these header lines, every -line in the change log starts with a space or a tab. The bulk of the -entry consists of @dfn{items}, each of which starts with a line starting -with whitespace and a star. Here are two entries, both dated in May -1993, with two items and one item respectively. + A change log entry starts with a header line that contains the +current date, your name (taken from the variable +@code{add-log-full-name}), and your email address (taken from the +variable @code{add-log-mailing-address}). Aside from these header +lines, every line in the change log starts with a space or a tab. The +bulk of the entry consists of @dfn{items}, each of which starts with a +line starting with whitespace and a star. Here are two entries, both +dated in May 1993, with two items and one item respectively. @iftex @medbreak ------------------------------------------------------------ revno: 103463 committer: Juanma Barranquero branch nick: trunk timestamp: Tue 2011-03-01 04:59:31 +0100 message: lisp/emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:38:41 +0000 +++ lisp/ChangeLog 2011-03-01 03:59:31 +0000 @@ -1,3 +1,7 @@ +2011-03-01 Juanma Barranquero + + * emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. + 2011-03-01 Glenn Morris * calendar/cal-hebrew.el (calendar-hebrew-birthday, diary-hebrew-date): === modified file 'lisp/emacs-lisp/cl-loaddefs.el' --- lisp/emacs-lisp/cl-loaddefs.el 2011-02-13 00:16:28 +0000 +++ lisp/emacs-lisp/cl-loaddefs.el 2011-03-01 03:59:31 +0000 @@ -282,7 +282,7 @@ ;;;;;; do-all-symbols do-symbols dotimes dolist do* do loop return-from ;;;;;; return block etypecase typecase ecase case load-time-value ;;;;;; eval-when destructuring-bind function* defmacro* defun* gentemp -;;;;;; gensym) "cl-macs" "cl-macs.el" "0904b956872432ae7cc5fa9abcefce63") +;;;;;; gensym) "cl-macs" "cl-macs.el" "b3031039e82679e5b013ce1cbf174ee8") ;;; Generated autoloads from cl-macs.el (autoload 'gensym "cl-macs" "\ @@ -505,7 +505,7 @@ (autoload 'lexical-let* "cl-macs" "\ Like `let*', but lexically scoped. The main visible difference is that lambdas inside BODY, and in -successive bindings within BINDINGS, will create lexical closures +successive bindings within VARLIST, will create lexical closures as in Common Lisp. This is similar to the behavior of `let*' in Common Lisp. === modified file 'lisp/emacs-lisp/cl-macs.el' --- lisp/emacs-lisp/cl-macs.el 2011-02-05 22:30:14 +0000 +++ lisp/emacs-lisp/cl-macs.el 2011-03-01 03:59:31 +0000 @@ -1470,7 +1470,7 @@ (defmacro lexical-let* (bindings &rest body) "Like `let*', but lexically scoped. The main visible difference is that lambdas inside BODY, and in -successive bindings within BINDINGS, will create lexical closures +successive bindings within VARLIST, will create lexical closures as in Common Lisp. This is similar to the behavior of `let*' in Common Lisp. \n(fn VARLIST BODY)" ------------------------------------------------------------ revno: 103462 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:53:18 -0800 message: * lisp/calendar/cal-hebrew.el (diary-ordinal-suffix): Declare. diff: === modified file 'lisp/calendar/cal-hebrew.el' --- lisp/calendar/cal-hebrew.el 2011-03-01 03:38:41 +0000 +++ lisp/calendar/cal-hebrew.el 2011-03-01 03:53:18 +0000 @@ -815,6 +815,7 @@ (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) (defvar entry) +(declare-function diary-ordinal-suffix "diary-lib" (n)) ;;;###diary-autoload (defun diary-hebrew-birthday (month day year &optional after-sunset) ------------------------------------------------------------ revno: 103461 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:43:14 -0800 message: * lisp/files.el: Comment. diff: === modified file 'lisp/files.el' --- lisp/files.el 2011-03-01 03:05:28 +0000 +++ lisp/files.el 2011-03-01 03:43:14 +0000 @@ -5848,6 +5848,9 @@ (file-name-directory file) (file-name-directory (expand-file-name file)))) (pattern (file-name-nondirectory file))) + ;; NB since switches is passed to the shell, be + ;; careful of malicious values, eg "-l;reboot". + ;; See eg dired-safe-switches-p. (call-process shell-file-name nil t nil "-c" ------------------------------------------------------------ revno: 103460 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:41:05 -0800 message: * admin/notes/bzr: Tiny addition. diff: === modified file 'admin/notes/bzr' --- admin/notes/bzr 2011-02-24 03:56:36 +0000 +++ admin/notes/bzr 2011-03-01 03:41:05 +0000 @@ -81,6 +81,8 @@ will merge ALL changed entries (including older ones) to the top of the destination file. +Maybe the default Emacs behavior without this plugin is better, I dunno. + 1) Get clean, up-to-date copies of the emacs-23 and trunk branches. Check for any uncommitted changes with bzr status. ------------------------------------------------------------ revno: 103459 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:38:41 -0800 message: Rework previous cal-hebrew change. * lisp/calendar/cal-hebrew.el (calendar-hebrew-birthday, diary-hebrew-date): Rename and rework functions added in previous change. * etc/NEWS: Mention diary-hebrew-birthday. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-03-01 03:05:28 +0000 +++ etc/NEWS 2011-03-01 03:38:41 +0000 @@ -391,6 +391,8 @@ ** Calendar, Diary, and Appt +*** New function `diary-hebrew-birthday'. + --- *** The obsolete (since Emacs 22.1) method of enabling the appt package by adding appt-make-list to diary-hook has been removed. Use appt-activate. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:32:05 +0000 +++ lisp/ChangeLog 2011-03-01 03:38:41 +0000 @@ -1,3 +1,8 @@ +2011-03-01 Glenn Morris + + * calendar/cal-hebrew.el (calendar-hebrew-birthday, diary-hebrew-date): + Rename and rework functions added in previous change. + 2011-03-01 Ed Reingold * calendar/cal-hebrew.el (hebrew-calendar-birthday) === modified file 'lisp/calendar/cal-hebrew.el' --- lisp/calendar/cal-hebrew.el 2011-03-01 03:32:05 +0000 +++ lisp/calendar/cal-hebrew.el 2011-03-01 03:38:41 +0000 @@ -792,22 +792,19 @@ (define-obsolete-function-alias 'list-yahrzeit-dates 'calendar-hebrew-list-yahrzeits "23.1") -(defun hebrew-calendar-birthday (birth-date year) - "Absolute date of the anniversary of Hebrew BIRTH-DATE in Hebrew YEAR." - (let* ((birth-day (extract-calendar-day birth-date)) - (birth-month (extract-calendar-month birth-date)) - (birth-year (extract-calendar-year birth-date))) - (if ; It's Adar in a normal Hebrew year or Adar II - ; in a Hebrew leap year, - (= birth-month (hebrew-calendar-last-month-of-year birth-year)) - ;; Then use the same day in last month of Hebrew year. - (calendar-absolute-from-hebrew - (list (hebrew-calendar-last-month-of-year year) birth-day year)) +(defun calendar-hebrew-birthday (date year) + "Absolute date of the anniversary of Hebrew birth DATE, in Hebrew YEAR." + (let ((b-day (calendar-extract-day date)) + (b-month (calendar-extract-month date)) + (b-year (calendar-extract-year date))) + ;; If it's Adar in a normal Hebrew year or Adar II in a Hebrew leap year... + (if (= b-month (calendar-hebrew-last-month-of-year b-year)) + ;; ...then use the same day in last month of Hebrew year. + (calendar-hebrew-to-absolute + (list (calendar-hebrew-last-month-of-year year) b-day year)) ;; Else use the normal anniversary of the birth date, - ;; or the corresponding day in years without that date - (+ (calendar-absolute-from-hebrew - (list birth-month 1 year)) - birth-day -1)))) + ;; or the corresponding day in years without that date. + (+ (calendar-hebrew-to-absolute (list b-month 1 year)) b-day -1)))) (defvar date) @@ -817,39 +814,35 @@ "Hebrew calendar equivalent of date diary entry." (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) -(defun diary-hebrew-birthday - (birth-month birth-day birth-year &optional after-sunset) - "Hebrew birthday diary entry--entry applies if date is birthdate or the day -before. Parameters are BIRTH-MONTH, BIRTH-DAY, BIRTH-YEAR; the diary entry is -assumed to be the name of the person. Date of birth is on the *civil* -calendar; although the date of birth is specified by the civil calendar, the -proper Hebrew calendar birthday is determined. NOTE: If the birth occurred -after local sunset on the given civil date, the following civil date -corresponds to the Hebrew birthday--the optional parameter AFTER-SUNSET does -this correction when t. If `european-calendar-style' is t, the order of the -parameters is changed to BIRTH-DAY, BIRTH-MONTH, BIRTH-YEAR." +(defvar entry) + +;;;###diary-autoload +(defun diary-hebrew-birthday (month day year &optional after-sunset) + "Hebrew birthday diary entry. +Entry applies if date is birthdate (MONTH DAY YEAR), or the day before. +The order of the input parameters changes according to +`calendar-date-style' (e.g. to DAY MONTH YEAR in the European style). + +Assumes the associated diary entry is the name of the person. + +Although the date of birth is specified by the *civil* calendar, +this function determines the proper Hebrew calendar birthday. +If the optional argument AFTER-SUNSET is non-nil, this means the +birth occurred after local sunset on the given civil date. +In this case, the following civil date corresponds to the Hebrew birthday." (let* ((h-date (calendar-hebrew-from-absolute (+ (calendar-absolute-from-gregorian - (if european-calendar-style - (list birth-day birth-month birth-year) - (list birth-month birth-day birth-year))) + (diary-make-date month day year)) (if after-sunset 1 0)))) - (h-month (extract-calendar-month h-date)) - (h-day (extract-calendar-day h-date)) - (h-year (extract-calendar-year h-date)) - (d (calendar-absolute-from-gregorian date)) - (h-yr (extract-calendar-year (calendar-hebrew-from-absolute d))) - (age (- h-yr h-year)) - (b-date (hebrew-calendar-birthday h-date h-yr))) - (if (and (> age 0) (or (= b-date d) (= b-date (1+ d)))) - (format "%s's %d%s Hebrew birthday%s" - entry - age - (cond ((= (% age 10) 1) "st") - ((= (% age 10) 2) "nd") - ((= (% age 10) 3) "rd") - (t "th")) - (if (= b-date d) "" " (evening)"))))) + (h-year (calendar-extract-year h-date)) ; birth-day + (d (calendar-absolute-from-gregorian date)) ; today + (h-yr (calendar-extract-year (calendar-hebrew-from-absolute d))) + (age (- h-yr h-year)) ; current H year - birth H-year + (b-date (calendar-hebrew-birthday h-date h-yr))) + (and (> age 0) (memq b-date (list d (1+ d))) + (format "%s's %d%s Hebrew birthday%s" entry age + (diary-ordinal-suffix age) + (if (= b-date d) "" " (evening)"))))) ;;;###diary-autoload (defun diary-hebrew-omer (&optional mark) @@ -880,8 +873,6 @@ ;;;###diary-autoload (define-obsolete-function-alias 'diary-omer 'diary-hebrew-omer "23.1") -(defvar entry) - (autoload 'diary-make-date "diary-lib") (declare-function diary-ordinal-suffix "diary-lib" (n)) ------------------------------------------------------------ revno: 103458 author: Ed Reingold committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:32:05 -0800 message: Add some new cal-hebrew functions. * lisp/calendar/cal-hebrew.el (hebrew-calendar-birthday, diary-hebrew-birthday): New functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:25:24 +0000 +++ lisp/ChangeLog 2011-03-01 03:32:05 +0000 @@ -1,3 +1,8 @@ +2011-03-01 Ed Reingold + + * calendar/cal-hebrew.el (hebrew-calendar-birthday) + (diary-hebrew-birthday): New functions. + 2011-03-01 Glenn Morris * dired.el (dired-safe-switches-p): Beef it up. === modified file 'lisp/calendar/cal-hebrew.el' --- lisp/calendar/cal-hebrew.el 2011-01-25 04:08:28 +0000 +++ lisp/calendar/cal-hebrew.el 2011-03-01 03:32:05 +0000 @@ -792,6 +792,23 @@ (define-obsolete-function-alias 'list-yahrzeit-dates 'calendar-hebrew-list-yahrzeits "23.1") +(defun hebrew-calendar-birthday (birth-date year) + "Absolute date of the anniversary of Hebrew BIRTH-DATE in Hebrew YEAR." + (let* ((birth-day (extract-calendar-day birth-date)) + (birth-month (extract-calendar-month birth-date)) + (birth-year (extract-calendar-year birth-date))) + (if ; It's Adar in a normal Hebrew year or Adar II + ; in a Hebrew leap year, + (= birth-month (hebrew-calendar-last-month-of-year birth-year)) + ;; Then use the same day in last month of Hebrew year. + (calendar-absolute-from-hebrew + (list (hebrew-calendar-last-month-of-year year) birth-day year)) + ;; Else use the normal anniversary of the birth date, + ;; or the corresponding day in years without that date + (+ (calendar-absolute-from-hebrew + (list birth-month 1 year)) + birth-day -1)))) + (defvar date) ;; To be called from diary-list-sexp-entries, where DATE is bound. @@ -800,6 +817,40 @@ "Hebrew calendar equivalent of date diary entry." (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) +(defun diary-hebrew-birthday + (birth-month birth-day birth-year &optional after-sunset) + "Hebrew birthday diary entry--entry applies if date is birthdate or the day +before. Parameters are BIRTH-MONTH, BIRTH-DAY, BIRTH-YEAR; the diary entry is +assumed to be the name of the person. Date of birth is on the *civil* +calendar; although the date of birth is specified by the civil calendar, the +proper Hebrew calendar birthday is determined. NOTE: If the birth occurred +after local sunset on the given civil date, the following civil date +corresponds to the Hebrew birthday--the optional parameter AFTER-SUNSET does +this correction when t. If `european-calendar-style' is t, the order of the +parameters is changed to BIRTH-DAY, BIRTH-MONTH, BIRTH-YEAR." + (let* ((h-date (calendar-hebrew-from-absolute + (+ (calendar-absolute-from-gregorian + (if european-calendar-style + (list birth-day birth-month birth-year) + (list birth-month birth-day birth-year))) + (if after-sunset 1 0)))) + (h-month (extract-calendar-month h-date)) + (h-day (extract-calendar-day h-date)) + (h-year (extract-calendar-year h-date)) + (d (calendar-absolute-from-gregorian date)) + (h-yr (extract-calendar-year (calendar-hebrew-from-absolute d))) + (age (- h-yr h-year)) + (b-date (hebrew-calendar-birthday h-date h-yr))) + (if (and (> age 0) (or (= b-date d) (= b-date (1+ d)))) + (format "%s's %d%s Hebrew birthday%s" + entry + age + (cond ((= (% age 10) 1) "st") + ((= (% age 10) 2) "nd") + ((= (% age 10) 3) "rd") + (t "th")) + (if (= b-date d) "" " (evening)"))))) + ;;;###diary-autoload (defun diary-hebrew-omer (&optional mark) "Omer count diary entry. ------------------------------------------------------------ revno: 103457 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:25:24 -0800 message: Give dired-actual-switches a safe-local-variable property. (Bug#3230) * lisp/dired.el (dired-safe-switches-p): Beef it up. (dired-actual-switches): Use it for the safe-local-variable property. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:10:11 +0000 +++ lisp/ChangeLog 2011-03-01 03:25:24 +0000 @@ -1,3 +1,8 @@ +2011-03-01 Glenn Morris + + * dired.el (dired-safe-switches-p): Beef it up. + (dired-actual-switches): Use it for the safe-local prop. (Bug#3230) + 2011-03-01 Stefan Monnier * dired.el (dired-safe-switches-p): New function. === modified file 'lisp/dired.el' --- lisp/dired.el 2011-03-01 03:10:11 +0000 +++ lisp/dired.el 2011-03-01 03:25:24 +0000 @@ -249,12 +249,19 @@ directory name and the cdr is the list of files to mention. The directory name must be absolute, but need not be fully expanded.") +;; Beware of "-l;reboot" etc. See bug#3230. (defun dired-safe-switches-p (switches) - (string-match "\\`[- [:alnum:]]+\\'" switches)) + "Return non-nil if string SWITCHES does not look risky for dired." + (or (not switches) + (and (stringp switches) + (< (length switches) 100) ; arbitrary + (string-match "\\` *-[- [:alnum:]]+\\'" switches)))) (defvar dired-actual-switches nil "The value of `dired-listing-switches' used to make this buffer's text.") +(put 'dired-actual-switches 'safe-local-variable 'dired-safe-switches-p) + (defvar dired-re-inode-size "[0-9 \t]*" "Regexp for optional initial inode and file size as made by `ls -i -s'.") @@ -3617,7 +3624,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "9d6333fab9c0f1b49e0bf2a536b8f245") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "154cdfbf451aedec60c5012b625ff329") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -4076,7 +4083,7 @@ ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "c24f202ea049990539accfd4c2c73fe9") +;;;;;; "3b8851132739ab3f9054bf639873c53e") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ ------------------------------------------------------------ revno: 103456 author: Stefan Monnier committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:10:11 -0800 message: * lisp/dired.el (dired-safe-switches-p): New function. (Bug#3230) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-03-01 03:05:28 +0000 +++ lisp/ChangeLog 2011-03-01 03:10:11 +0000 @@ -1,3 +1,7 @@ +2011-03-01 Stefan Monnier + + * dired.el (dired-safe-switches-p): New function. + 2011-03-01 Glenn Morris * files.el (dir-locals-collect-variables): === modified file 'lisp/dired.el' --- lisp/dired.el 2011-02-26 09:48:22 +0000 +++ lisp/dired.el 2011-03-01 03:10:11 +0000 @@ -249,6 +249,9 @@ directory name and the cdr is the list of files to mention. The directory name must be absolute, but need not be fully expanded.") +(defun dired-safe-switches-p (switches) + (string-match "\\`[- [:alnum:]]+\\'" switches)) + (defvar dired-actual-switches nil "The value of `dired-listing-switches' used to make this buffer's text.") ------------------------------------------------------------ revno: 103455 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 19:05:28 -0800 message: Add the ability to exclude dir-locals from subdirs. (Bug#8100) * lisp/files.el (dir-locals-collect-variables): Add the ability to exclude subdirectories. * doc/emacs/custom.texi (Directory Variables): Give an example of excluding subdirectories. * doc/lispref/variables.texi (Directory Local Variables): Mention `(subdirs . nil)' alist element. * etc/NEWS: Mention this addition. * lisp/dired-x.el (dired-omit-here-always): Add `(subdirs . nil)' to locals. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2011-02-28 01:07:29 +0000 +++ doc/emacs/ChangeLog 2011-03-01 03:05:28 +0000 @@ -1,3 +1,8 @@ +2011-03-01 Glenn Morris + + * custom.texi (Directory Variables): + Give an example of excluding subdirectories. + 2011-02-28 Eli Zaretskii * search.texi (Regexp Search): Move index entries about regexps to the === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2011-02-05 22:30:14 +0000 +++ doc/emacs/custom.texi 2011-03-01 03:05:28 +0000 @@ -1331,7 +1331,8 @@ (tab-width . 4) (fill-column . 80))) (c-mode . ((c-file-style . "BSD"))) - (java-mode . ((c-file-style . "BSD"))) + (java-mode . ((c-file-style . "BSD") + (subdirs . nil))) ("src/imported" . ((nil . ((change-log-default-name . "ChangeLog.local")))))) @end example @@ -1340,8 +1341,10 @@ This example shows some settings for a hypothetical project. It sets @samp{indent-tabs-mode}, @code{tab-width}, and @code{fill-column} for any file in the project's directory tree, and it sets the indentation -style for any C or Java source file. Finally, it specifies a different -@file{ChangeLog} file name for any file in the @file{src/imported} +style for any C or Java source file. The special @code{subdirs} element +indicates that the Java mode settings are only to be applied in the +current directory, not in any subdirectories. Finally, it specifies a +different @file{ChangeLog} file name for any file in the @file{src/imported} subdirectory of the directory where you put the @file{.dir-locals.el} file. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2011-02-28 01:07:29 +0000 +++ doc/lispref/ChangeLog 2011-03-01 03:05:28 +0000 @@ -1,3 +1,8 @@ +2011-03-01 Glenn Morris + + * variables.texi (Directory Local Variables): + Mention `(subdirs . nil)' alist element. + 2011-02-28 Glenn Morris * variables.texi (Directory Local Variables): Mention the optional === modified file 'doc/lispref/variables.texi' --- doc/lispref/variables.texi 2011-02-28 01:07:29 +0000 +++ doc/lispref/variables.texi 2011-03-01 03:05:28 +0000 @@ -1718,7 +1718,8 @@ The MS-DOS version of Emacs uses @file{_dir-locals.el} instead, due to limitations of the DOS filesystems. }. A file by that name in a directory causes Emacs to apply its -settings to any file in that directory or any of its subdirectories. +settings to any file in that directory or any of its subdirectories +(optionally, you can exclude subdirectories; see below). If some of the subdirectories have their own @file{.dir-locals.el} files, Emacs uses the settings from the deepest file it finds starting from the file's directory and moving up the directory tree. The file @@ -1749,7 +1750,10 @@ then the all the variables in the associated @var{alist} are applied; @var{alist} should be of the form @code{(@var{name} . @var{value})}. A special value @code{nil} for @var{major-mode} means the settings are -applicable to any mode. +applicable to any mode. In @var{alist}, you can use a special +@var{name}: @code{subdirs}. If the associated value is +@code{nil}, the alist is only applied to files in the relevant +directory, not to those in any subdirectories. With the second form of @var{variables}, if @var{directory} is the initial substring of the file's directory, then @var{list} is applied === modified file 'etc/NEWS' --- etc/NEWS 2011-02-23 15:22:28 +0000 +++ etc/NEWS 2011-03-01 03:05:28 +0000 @@ -353,6 +353,11 @@ will turn on `whitespace-mode' for *vc-diff* buffers. Modes should call `hack-dir-local-variables-non-file-buffer' to support this. ++++ +** You can prevent directory local variables from applying to subdirectories. +Add an element (subdirs . nil) to the alist portion of any variables +settings to indicate said section should not be applied to subdirectories. + ** ERC changes *** New vars `erc-autojoin-timing' and `erc-autojoin-delay'. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 20:25:50 +0000 +++ lisp/ChangeLog 2011-03-01 03:05:28 +0000 @@ -1,3 +1,10 @@ +2011-03-01 Glenn Morris + + * files.el (dir-locals-collect-variables): + Add the ability to exclude subdirectories. (Bug#8100) + + * dired-x.el (dired-omit-here-always): Add `(subdirs . nil)' to locals. + 2011-02-28 Christoph Scholtes * ido.el (ido-everywhere): Doc fix. === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-28 17:42:03 +0000 +++ lisp/dired-x.el 2011-03-01 03:05:28 +0000 @@ -786,6 +786,7 @@ 'hack-dir-local-variables-non-file-buffer "24.1") ;; Not sure this is worth having a dedicated command for... +;; See the more general features in files-x.el. (defun dired-omit-here-always () "Create `dir-locals-file' setting `dired-omit-mode' to t in `dired-mode'. If in a Dired buffer, reverts it." @@ -798,7 +799,9 @@ (if (file-exists-p dir-locals-file) (message "File `./%s' already exists." dir-locals-file) (with-temp-buffer - (insert "((dired-mode . ((dired-omit-mode . t))))\n") + (insert "\ +\((dired-mode . ((subdirs . nil) + (dired-omit-mode . t))))\n") (write-file dir-locals-file)) ;; Run extra-hooks and revert directory. (when (derived-mode-p 'dired-mode) === modified file 'lisp/files.el' --- lisp/files.el 2011-02-24 08:02:45 +0000 +++ lisp/files.el 2011-03-01 03:05:28 +0000 @@ -3394,8 +3394,19 @@ (cdr entry) root variables)))) ((or (not key) (derived-mode-p key)) - (setq variables (dir-locals-collect-mode-variables - (cdr entry) variables)))))) + (let* ((alist (cdr entry)) + (subdirs (assq 'subdirs alist))) + (if (or (not subdirs) + (progn + (setq alist (delq subdirs alist)) + (cdr-safe subdirs)) + ;; TODO someone might want to extent this to allow + ;; integer values for subdir, where N means + ;; variables apply to this directory and N levels + ;; below it (0 == nil). + (equal root default-directory)) + (setq variables (dir-locals-collect-mode-variables + alist variables)))))))) (error ;; The file's content might be invalid (e.g. have a merge conflict), but ;; that shouldn't prevent the user from opening the file. ------------------------------------------------------------ revno: 103454 committer: Christoph Scholtes branch nick: trunk timestamp: Mon 2011-02-28 13:25:50 -0700 message: * ido.el (ido-everywhere): Doc fix. (ido-mode): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 17:42:03 +0000 +++ lisp/ChangeLog 2011-02-28 20:25:50 +0000 @@ -1,3 +1,8 @@ +2011-02-28 Christoph Scholtes + + * ido.el (ido-everywhere): Doc fix. + (ido-mode): Doc fix. + 2011-02-28 Glenn Morris * dired-x.el (dired-guess-shell-alist-default): Use \\', not $. === modified file 'lisp/ido.el' --- lisp/ido.el 2011-01-25 04:08:28 +0000 +++ lisp/ido.el 2011-02-28 20:25:50 +0000 @@ -1472,8 +1472,8 @@ (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) (define-minor-mode ido-everywhere - "Toggle using ido speed-ups everywhere file and directory names are read. -With ARG, turn ido speed-up on if arg is positive, off otherwise." + "Toggle using ido-mode everywhere file and directory names are read. +With ARG, turn ido-mode on if arg is positive, off otherwise." :global t :group 'ido (when (get 'ido-everywhere 'file) @@ -1494,8 +1494,8 @@ ;;;###autoload (defun ido-mode (&optional arg) - "Toggle ido speed-ups on or off. -With ARG, turn ido speed-up on if arg is positive, off otherwise. + "Toggle ido mode on or off. +With ARG, turn ido-mode on if arg is positive, off otherwise. Turning on ido-mode will remap (via a minor-mode keymap) the default keybindings for the `find-file' and `switch-to-buffer' families of commands to the ido versions of these functions. ------------------------------------------------------------ revno: 103453 committer: Glenn Morris branch nick: trunk timestamp: Mon 2011-02-28 09:42:03 -0800 message: * lisp/dired-x.el (dired-guess-shell-alist-default): Use \\', not $. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 10:58:59 +0000 +++ lisp/ChangeLog 2011-02-28 17:42:03 +0000 @@ -1,3 +1,7 @@ +2011-02-28 Glenn Morris + + * dired-x.el (dired-guess-shell-alist-default): Use \\', not $. + 2011-02-28 Michael Albinus * net/tramp-cmds.el (tramp-append-tramp-buffers): Dump load-path === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-28 07:24:39 +0000 +++ lisp/dired-x.el 2011-02-28 17:42:03 +0000 @@ -845,7 +845,7 @@ (defvar dired-guess-shell-alist-default (list - (list "\\.tar$" + (list "\\.tar\\'" '(if dired-guess-shell-gnutar (concat dired-guess-shell-gnutar " xvf") "tar xvf") @@ -863,7 +863,7 @@ ;; REGEXPS for compressed archives must come before the .Z rule to ;; be recognized: - (list "\\.tar\\.Z$" + (list "\\.tar\\.Z\\'" ;; Untar it. '(if dired-guess-shell-gnutar (concat dired-guess-shell-gnutar " zxvf") @@ -873,7 +873,7 @@ " " dired-guess-shell-znew-switches)) ;; gzip'ed archives - (list "\\.t\\(ar\\.\\)?gz$" + (list "\\.t\\(ar\\.\\)?gz\\'" '(if dired-guess-shell-gnutar (concat dired-guess-shell-gnutar " zxvf") (concat "gunzip -qc * | tar xvf -")) @@ -893,7 +893,7 @@ (concat "gunzip -qc * | tar tvf -"))) ;; bzip2'ed archives - (list "\\.t\\(ar\\.bz2\\|bz\\)$" + (list "\\.t\\(ar\\.bz2\\|bz\\)\\'" "bunzip2 -c * | tar xvf -" ;; Extract files into a separate subdirectory '(concat "mkdir " (file-name-sans-extension file) @@ -903,7 +903,7 @@ "bunzip2") ;; xz'ed archives - (list "\\.t\\(ar\\.\\)?xz$" + (list "\\.t\\(ar\\.\\)?xz\\'" "unxz -c * | tar xvf -" ;; Extract files into a separate subdirectory '(concat "mkdir " (file-name-sans-extension file) @@ -912,96 +912,96 @@ ;; Optional decompression. "unxz") - '("\\.shar\\.Z$" "zcat * | unshar") - '("\\.shar\\.g?z$" "gunzip -qc * | unshar") + '("\\.shar\\.Z\\'" "zcat * | unshar") + '("\\.shar\\.g?z\\'" "gunzip -qc * | unshar") - '("\\.e?ps$" "ghostview" "xloadimage" "lpr") - (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" + '("\\.e?ps\\'" "ghostview" "xloadimage" "lpr") + (list "\\.e?ps\\.g?z\\'" "gunzip -qc * | ghostview -" ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.e?ps\\.Z$" "zcat * | ghostview -" + (list "\\.e?ps\\.Z\\'" "zcat * | ghostview -" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) - '("\\.patch$" "cat * | patch") - (list "\\.patch\\.g?z$" "gunzip -qc * | patch" + '("\\.patch\\'" "cat * | patch") + (list "\\.patch\\.g?z\\'" "gunzip -qc * | patch" ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.patch\\.Z$" "zcat * | patch" + (list "\\.patch\\.Z\\'" "zcat * | patch" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) ;; The following four extensions are useful with dired-man ("N" key) - (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) + (list "\\.\\(?:[0-9]\\|man\\)\\'" '(progn (require 'man) (if (Man-support-local-filenames) "man -l" "cat * | tbl | nroff -man -h"))) - (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) + (list "\\.\\(?:[0-9]\\|man\\)\\.g?z\\'" '(progn (require 'man) (if (Man-support-local-filenames) "man -l" "gunzip -qc * | tbl | nroff -man -h")) ;; Optional decompression. '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.[0-9]\\.Z$" '(progn (require 'man) + (list "\\.[0-9]\\.Z\\'" '(progn (require 'man) (if (Man-support-local-filenames) "man -l" "zcat * | tbl | nroff -man -h")) ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) - '("\\.pod$" "perldoc" "pod2man * | nroff -man") + '("\\.pod\\'" "perldoc" "pod2man * | nroff -man") - '("\\.dvi$" "xdvi" "dvips") ; preview and printing - '("\\.au$" "play") ; play Sun audiofiles - '("\\.mpe?g$\\|\\.avi$" "xine -p") - '("\\.ogg$" "ogg123") - '("\\.mp3$" "mpg123") - '("\\.wav$" "play") - '("\\.uu$" "uudecode") ; for uudecoded files - '("\\.hqx$" "mcvert") - '("\\.sh$" "sh") ; execute shell scripts - '("\\.xbm$" "bitmap") ; view X11 bitmaps - '("\\.gp$" "gnuplot") - '("\\.p[bgpn]m$" "xloadimage") - '("\\.gif$" "xloadimage") ; view gif pictures - '("\\.tif$" "xloadimage") - '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG - '("\\.jpe?g$" "xloadimage") - '("\\.fig$" "xfig") ; edit fig pictures - '("\\.out$" "xgraph") ; for plotting purposes. - '("\\.tex$" "latex" "tex") - '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") - '("\\.pdf$" "xpdf") - '("\\.doc$" "antiword" "strings") - '("\\.rpm$" "rpm -qilp" "rpm -ivh") - '("\\.dia$" "dia") - '("\\.mgp$" "mgp") + '("\\.dvi\\'" "xdvi" "dvips") ; preview and printing + '("\\.au\\'" "play") ; play Sun audiofiles + '("\\.mpe?g\\'\\|\\.avi\\'" "xine -p") + '("\\.ogg\\'" "ogg123") + '("\\.mp3\\'" "mpg123") + '("\\.wav\\'" "play") + '("\\.uu\\'" "uudecode") ; for uudecoded files + '("\\.hqx\\'" "mcvert") + '("\\.sh\\'" "sh") ; execute shell scripts + '("\\.xbm\\'" "bitmap") ; view X11 bitmaps + '("\\.gp\\'" "gnuplot") + '("\\.p[bgpn]m\\'" "xloadimage") + '("\\.gif\\'" "xloadimage") ; view gif pictures + '("\\.tif\\'" "xloadimage") + '("\\.png\\'" "display") ; xloadimage 4.1 doesn't grok PNG + '("\\.jpe?g\\'" "xloadimage") + '("\\.fig\\'" "xfig") ; edit fig pictures + '("\\.out\\'" "xgraph") ; for plotting purposes. + '("\\.tex\\'" "latex" "tex") + '("\\.texi\\(nfo\\)?\\'" "makeinfo" "texi2dvi") + '("\\.pdf\\'" "xpdf") + '("\\.doc\\'" "antiword" "strings") + '("\\.rpm\\'" "rpm -qilp" "rpm -ivh") + '("\\.dia\\'" "dia") + '("\\.mgp\\'" "mgp") ;; Some other popular archivers. - (list "\\.zip$" "unzip" "unzip -l" + (list "\\.zip\\'" "unzip" "unzip -l" ;; Extract files into a separate subdirectory '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") " -d " (file-name-sans-extension file))) - '("\\.zoo$" "zoo x//") - '("\\.lzh$" "lharc x") - '("\\.arc$" "arc x") - '("\\.shar$" "unshar") - '("\\.rar$" "unrar x") - '("\\.7z$" "7z x") + '("\\.zoo\\'" "zoo x//") + '("\\.lzh\\'" "lharc x") + '("\\.arc\\'" "arc x") + '("\\.shar\\'" "unshar") + '("\\.rar\\'" "unrar x") + '("\\.7z\\'" "7z x") ;; Compression. - (list "\\.g?z$" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) - (list "\\.dz$" "dictunzip") - (list "\\.bz2$" "bunzip2") - (list "\\.xz$" "unxz") - (list "\\.Z$" "uncompress" + (list "\\.g?z\\'" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) + (list "\\.dz\\'" "dictunzip") + (list "\\.bz2\\'" "bunzip2") + (list "\\.xz\\'" "unxz") + (list "\\.Z\\'" "uncompress" ;; Optional conversion to gzip format. '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") " " dired-guess-shell-znew-switches)) - '("\\.sign?$" "gpg --verify")) + '("\\.sign?\\'" "gpg --verify")) "Default alist used for shell command guessing. See `dired-guess-shell-alist-user'.") ------------------------------------------------------------ revno: 103452 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-02-28 12:10:06 +0100 message: * tramp.texi (Frequently Asked Questions): Add Emacs 24 to supported systems. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2011-02-28 01:07:29 +0000 +++ doc/misc/ChangeLog 2011-02-28 11:10:06 +0000 @@ -1,3 +1,8 @@ +2011-02-28 Michael Albinus + + * tramp.texi (Frequently Asked Questions): Add Emacs 24 to + supported systems. + 2011-02-28 Glenn Morris * dbus.texi (Type Conversion): Grammar fix. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2011-02-23 04:19:28 +0000 +++ doc/misc/tramp.texi 2011-02-28 11:10:06 +0000 @@ -2740,8 +2740,8 @@ @item Which systems does it work on? -The package has been used successfully on Emacs 22, Emacs 23, XEmacs -21 (starting with 21.4), and SXEmacs 22. +The package has been used successfully on Emacs 22, Emacs 23, Emacs +24, XEmacs 21 (starting with 21.4), and SXEmacs 22. The package was intended to work on Unix, and it really expects a Unix-like system on the remote end (except the @option{smb} method), ------------------------------------------------------------ revno: 103451 committer: Michael Albinus branch nick: trunk timestamp: Mon 2011-02-28 11:58:59 +0100 message: * net/tramp-cmds.el (tramp-append-tramp-buffers): Dump load-path shadows. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 07:24:39 +0000 +++ lisp/ChangeLog 2011-02-28 10:58:59 +0000 @@ -1,3 +1,8 @@ +2011-02-28 Michael Albinus + + * net/tramp-cmds.el (tramp-append-tramp-buffers): Dump load-path + shadows. + 2011-02-28 Antoine Levitt (tiny change) * dired-x.el (dired-guess-shell-alist-default): Add rar and 7z. === modified file 'lisp/net/tramp-cmds.el' --- lisp/net/tramp-cmds.el 2011-01-25 04:08:28 +0000 +++ lisp/net/tramp-cmds.el 2011-02-28 10:58:59 +0000 @@ -281,6 +281,12 @@ (insert ")\n")) (insert-buffer-substring elbuf))) + ;; Dump load-path shadows. + (insert "\nload-path shadows:\n==================\n") + (ignore-errors + (mapc (lambda (x) (when (string-match "tramp" x) (insert x "\n"))) + (split-string (list-load-path-shadows t) "\n"))) + ;; Append buffers only when we are in message mode. (when (and (eq major-mode 'message-mode) ------------------------------------------------------------ revno: 103450 author: Antoine Levitt committer: Glenn Morris branch nick: trunk timestamp: Sun 2011-02-27 23:24:39 -0800 message: * lisp/dired-x.el (dired-guess-shell-alist-default): Add rar and 7z. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 04:24:40 +0000 +++ lisp/ChangeLog 2011-02-28 07:24:39 +0000 @@ -1,3 +1,7 @@ +2011-02-28 Antoine Levitt (tiny change) + + * dired-x.el (dired-guess-shell-alist-default): Add rar and 7z. + 2011-02-28 Juanma Barranquero * emacs-lisp/pcase.el (pcase, pcase--u1, pcase--q1): === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2011-02-24 03:59:04 +0000 +++ lisp/dired-x.el 2011-02-28 07:24:39 +0000 @@ -988,6 +988,8 @@ '("\\.lzh$" "lharc x") '("\\.arc$" "arc x") '("\\.shar$" "unshar") + '("\\.rar$" "unrar x") + '("\\.7z$" "7z x") ;; Compression. (list "\\.g?z$" '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) ------------------------------------------------------------ revno: 103449 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2011-02-28 05:24:40 +0100 message: lisp/emacs-lisp/pcase.el (pcase, pcase--u1, pcase--q1): Fix typos in docstrings. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-02-28 01:35:59 +0000 +++ lisp/ChangeLog 2011-02-28 04:24:40 +0000 @@ -1,3 +1,8 @@ +2011-02-28 Juanma Barranquero + + * emacs-lisp/pcase.el (pcase, pcase--u1, pcase--q1): + Fix typos in docstrings. + 2011-02-28 Stephen Berman * dired-aux.el (dired-update-file-line): === modified file 'lisp/emacs-lisp/pcase.el' --- lisp/emacs-lisp/pcase.el 2011-02-27 02:50:38 +0000 +++ lisp/emacs-lisp/pcase.el 2011-02-28 04:24:40 +0000 @@ -3,7 +3,7 @@ ;; Copyright (C) 2010-2011 Free Software Foundation, Inc. ;; Author: Stefan Monnier -;; Keywords: +;; Keywords: ;; This file is part of GNU Emacs. @@ -75,12 +75,12 @@ QPatterns can take the following forms: (QPAT1 . QPAT2) matches if QPAT1 matches the car and QPAT2 the cdr. ,UPAT matches if the UPattern UPAT matches. - STRING matches if the object is `equal' to STRING. + STRING matches if the object is `equal' to STRING. ATOM matches if the object is `eq' to ATOM. QPatterns for vectors are not implemented yet. PRED can take the form - FUNCTION in which case it gets called with one argument. + FUNCTION in which case it gets called with one argument. (FUN ARG1 .. ARGN) in which case it gets called with N+1 arguments. A PRED of the form FUNCTION is equivalent to one of the form (FUNCTION). PRED patterns can refer to variables bound earlier in the pattern. @@ -439,7 +439,7 @@ ;; bootstrapping problems. (defun pcase--u1 (matches code vars rest) "Return code that runs CODE (with VARS) if MATCHES match. -and otherwise defers to REST which is a list of branches of the form +Otherwise, it defers to REST which is a list of branches of the form \(ELSE-MATCH ELSE-CODE . ELSE-VARS)." ;; Depending on the order in which we choose to check each of the MATCHES, ;; the resulting tree may be smaller or bigger. So in general, we'd want @@ -591,7 +591,7 @@ (defun pcase--q1 (sym qpat matches code vars rest) "Return code that runs CODE if SYM matches QPAT and if MATCHES match. -and if not, defers to REST which is a list of branches of the form +Otherwise, it defers to REST which is a list of branches of the form \(OTHER_MATCH OTHER-CODE . OTHER-VARS)." (cond ((eq (car-safe qpat) '\,) (error "Can't use `,UPATTERN"))