comparison lisp/subr.el @ 5473:ac37a5f7e5be

Merge with trunk.
author Mats Lidell <matsl@xemacs.org>
date Thu, 17 Mar 2011 23:42:59 +0100
parents a9094f28f9a9 f00192e1cd49
children 1e544fd7be12
comparison
equal deleted inserted replaced
5472:e79980ee5efe 5473:ac37a5f7e5be
1746 if passed to `skip-chars-forward' or `skip-chars-backward'. 1746 if passed to `skip-chars-forward' or `skip-chars-backward'.
1747 1747
1748 Ranges and carets are not treated specially. This implementation is 1748 Ranges and carets are not treated specially. This implementation is
1749 in Lisp; do not use it in performance-critical code." 1749 in Lisp; do not use it in performance-critical code."
1750 (let ((list (delete-duplicates (string-to-list string) :test #'=))) 1750 (let ((list (delete-duplicates (string-to-list string) :test #'=)))
1751 (when (/= 1 (length list)) ;; No quoting needed in a string of length 1. 1751 (when (not (eql 1 (length list))) ;; No quoting needed in a string of
1752 (when (eq ?^ (car list)) 1752 ;; length 1.
1753 (when (eql ?^ (car list))
1753 (setq list (nconc (cdr list) '(?^)))) 1754 (setq list (nconc (cdr list) '(?^))))
1754 (when (memq ?\\ list) 1755 (when (memq ?\\ list)
1755 (setq list (delq ?\\ list) 1756 (setq list (delq ?\\ list)
1756 list (nconc (list ?\\ ?\\) list))) 1757 list (nconc (list ?\\ ?\\) list)))
1757 (when (memq ?- list) 1758 (when (memq ?- list)