diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 15 | ||||
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 86 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-loaddefs.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/copyright.el | 8 | ||||
-rw-r--r-- | lisp/emacs-lisp/generic.el | 4 | ||||
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 14 |
8 files changed, 75 insertions, 61 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 3a02d57f10d..efbe7a56927 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -642,8 +642,9 @@ directory or directories specified." (defun batch-update-autoloads () "Update loaddefs.el autoloads in batch mode. Calls `update-directory-autoloads' on the command line arguments." - (apply 'update-directory-autoloads command-line-args-left) - (setq command-line-args-left nil)) + (let ((args command-line-args-left)) + (setq command-line-args-left nil) + (apply 'update-directory-autoloads args))) (provide 'autoload) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index f49aff90a20..a4a0f1ad279 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1209,8 +1209,9 @@ char-equal char-to-string char-width compare-strings concat coordinates-in-window-p copy-alist copy-sequence copy-marker cos count-lines + decdoe-char decode-time default-boundp default-value documentation downcase - elt exp expt encode-time error-message-string + elt encode-char exp expt encode-time error-message-string fboundp fceiling featurep ffloor file-directory-p file-exists-p file-locked-p file-name-absolute-p file-newer-than-file-p file-readable-p file-symlink-p file-writable-p @@ -1221,7 +1222,7 @@ int-to-string intern-soft keymap-parent length local-variable-if-set-p local-variable-p log log10 logand - logb logior lognot logxor lsh + logb logior lognot logxor lsh langinfo make-list make-string make-symbol marker-buffer max member memq min mod multibyte-char-to-unibyte next-window nth nthcdr number-to-string @@ -1233,6 +1234,7 @@ string-to-int string-to-number substring sxhash symbol-function symbol-name symbol-plist symbol-value string-make-unibyte string-make-multibyte string-as-multibyte string-as-unibyte + string-to-multibyte tan truncate unibyte-char-to-multibyte upcase user-full-name user-login-name user-original-login-name user-variable-p @@ -1244,7 +1246,8 @@ '(arrayp atom bobp bolp bool-vector-p buffer-end buffer-list buffer-size buffer-string bufferp - car-safe case-table-p cdr-safe char-or-string-p commandp cons consp + car-safe case-table-p cdr-safe char-or-string-p characterp + charsetp commandp cons consp current-buffer current-global-map current-indentation current-local-map current-minor-mode-maps current-time current-time-string current-time-zone @@ -1256,11 +1259,13 @@ invocation-directory invocation-name keymapp line-beginning-position line-end-position list listp - make-marker mark mark-marker markerp memory-limit minibuffer-window + make-marker mark mark-marker markerp max-char + memory-limit minibuffer-window mouse-movement-p natnump nlistp not null number-or-marker-p numberp one-window-p overlayp - point point-marker point-min point-max preceding-char processp + point point-marker point-min point-max preceding-char primary-charset + processp recent-keys recursion-depth safe-length selected-frame selected-window sequencep standard-case-table standard-syntax-table stringp subrp symbolp diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5fafac0540f..f32671bc784 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -864,7 +864,7 @@ otherwise pop it") (setcar (cdr bytes) (logand pc 255)) (setcar bytes (lsh pc -8)))) (setq patchlist (cdr patchlist)))) - (concat (nreverse bytes)))) + (string-make-unibyte (concat (nreverse bytes))))) ;;; compile-time evaluation @@ -1949,13 +1949,13 @@ and will be removed soon. See (elisp)Backquote in the manual.")) (delete-region (point) (progn (re-search-forward "^(") (beginning-of-line) (point))) - (insert ";;; This file contains multibyte non-ASCII characters\n" - ";;; and therefore cannot be loaded into Emacs 19.\n") - ;; Replace "19" or "19.29" with "20", twice. + (insert ";;; This file contains utf-8 non-ASCII characters\n" + ";;; and therefore cannot be loaded into Emacs 21 or earlier.\n") + ;; Replace "19" or "19.29" with "22", twice. (re-search-forward "19\\(\\.[0-9]+\\)") - (replace-match "20") + (replace-match "23") (re-search-forward "19\\(\\.[0-9]+\\)") - (replace-match "20") + (replace-match "23") ;; Now compensate for the change in size, ;; to make sure all positions in the file remain valid. (setq delta (- (point-max) old-header-end)) @@ -1970,7 +1970,7 @@ and will be removed soon. See (elisp)Backquote in the manual.")) (set-buffer outbuffer) (goto-char (point-min)) ;; The magic number of .elc files is ";ELC", or 0x3B454C43. After - ;; that is the file-format version number (18, 19 or 20) as a + ;; that is the file-format version number (18, 19, 20, or 23) as a ;; byte, followed by some nulls. The primary motivation for doing ;; this is to get some binary characters up in the first line of ;; the file so that `diff' will simply say "Binary files differ" @@ -1982,7 +1982,7 @@ and will be removed soon. See (elisp)Backquote in the manual.")) (insert ";ELC" - (if (byte-compile-version-cond byte-compile-compatibility) 18 20) + (if (byte-compile-version-cond byte-compile-compatibility) 18 23) "\000\000\000\n" ) (insert ";;; Compiled by " @@ -2010,41 +2010,41 @@ and will be removed soon. See (elisp)Backquote in the manual.")) ;; the buffer contains multibyte characters. We may have to ;; compensate at the end in byte-compile-fix-header. (if dynamic-docstrings - (setq intro-string - ";;; This file uses dynamic docstrings, first added in Emacs 19.29.\n" - minimum-version "19.29") (setq intro-string - ";;; This file uses opcodes which do not exist in Emacs 18.\n" - minimum-version "19")) - ;; Now insert the comment and the error check. - (insert - "\n" - intro-string - ;; Have to check if emacs-version is bound so that this works - ;; in files loaded early in loadup.el. - "(if (and (boundp 'emacs-version)\n" - ;; If there is a name at the end of emacs-version, - ;; don't try to check the version number. - "\t (< (aref emacs-version (1- (length emacs-version))) ?A)\n" - "\t (or (and (boundp 'epoch::version) epoch::version)\n" - (format "\t (string-lessp emacs-version \"%s\")))\n" - minimum-version) - " (error \"`" - ;; prin1-to-string is used to quote backslashes. - (substring (prin1-to-string (file-name-nondirectory filename)) - 1 -1) - (format "' was compiled for Emacs %s or later\"))\n\n" - minimum-version) - ;; Insert semicolons as ballast, so that byte-compile-fix-header - ;; can delete them so as to keep the buffer positions - ;; constant for the actual compiled code. - ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n")) - ;; Here if we want Emacs 18 compatibility. - (when dynamic-docstrings - (error "Version-18 compatibility doesn't support dynamic doc strings")) - (when byte-compile-dynamic - (error "Version-18 compatibility doesn't support dynamic byte code")) - (insert "(or (boundp 'current-load-list) (setq current-load-list nil))\n" + ";;; This file uses dynamic docstrings, first added in Emacs 19.29.\n" + minimum-version "19.29") + (setq intro-string + ";;; This file uses opcodes which do not exist in Emacs 18.\n" + minimum-version "19")) + ;; Now insert the comment and the error check. + (insert + "\n" + intro-string + ;; Have to check if emacs-version is bound so that this works + ;; in files loaded early in loadup.el. + "(if (and (boundp 'emacs-version)\n" + ;; If there is a name at the end of emacs-version, + ;; don't try to check the version number. + "\t (< (aref emacs-version (1- (length emacs-version))) ?A)\n" + "\t (or (and (boundp 'epoch::version) epoch::version)\n" + (format "\t (string-lessp emacs-version \"%s\")))\n" + minimum-version) + " (error \"`" + ;; prin1-to-string is used to quote backslashes. + (substring (prin1-to-string (file-name-nondirectory filename)) + 1 -1) + (format "' was compiled for Emacs %s or later\"))\n\n" + minimum-version) + ;; Insert semicolons as ballast, so that byte-compile-fix-header + ;; can delete them so as to keep the buffer positions + ;; constant for the actual compiled code. + ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n")) + ;; Here if we want Emacs 18 compatibility. + (when dynamic-docstrings + (error "Version-18 compatibility doesn't support dynamic doc strings")) + (when byte-compile-dynamic + (error "Version-18 compatibility doesn't support dynamic byte code")) + (insert "(or (boundp 'current-load-list) (setq current-load-list nil))\n" "\n"))))) (defun byte-compile-output-file-form (form) @@ -3485,6 +3485,8 @@ That command is designed for interactive use only" fn)) (byte-defop-compiler-1 mapc byte-compile-funarg) (byte-defop-compiler-1 maphash byte-compile-funarg) (byte-defop-compiler-1 map-char-table byte-compile-funarg) +(byte-defop-compiler-1 map-char-table byte-compile-funarg-2) +;; map-charset-chars should be funarg but has optional third arg (byte-defop-compiler-1 sort byte-compile-funarg-2) (byte-defop-compiler-1 let) (byte-defop-compiler-1 let*) diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index e47247557d0..7b0f1961530 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -283,7 +283,7 @@ Not documented ;;;;;; do* do loop return-from return block etypecase typecase ecase ;;;;;; case load-time-value eval-when destructuring-bind function* ;;;;;; defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" -;;;;;; "cl-macs.el" "c9b59a98f2066022e751aa5203b8d6b0") +;;;;;; "cl-macs.el" "24c5d69dcac117dea68e32a91fec9f67") ;;; Generated autoloads from cl-macs.el (autoload 'cl-compile-time-init "cl-macs" "\ diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 9e078d04be3..9a70c8bf778 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2452,7 +2452,7 @@ The type name can then be used in `typecase', `check-type', etc." ((eq type 'real) `(numberp ,val)) ((eq type 'fixnum) `(integerp ,val)) ;; FIXME: Should `character' accept things like ?\C-\M-a ? -stef - ((memq type '(character string-char)) `(char-valid-p ,val)) + ((memq type '(character string-char)) `(characterp ,val)) (t (let* ((name (symbol-name type)) (namep (intern (concat name "p")))) diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el index 1b86acb0329..55acb423e7b 100644 --- a/lisp/emacs-lisp/copyright.el +++ b/lisp/emacs-lisp/copyright.el @@ -43,11 +43,9 @@ A value of nil means to search whole buffer." :type '(choice (integer :tag "Limit") (const :tag "No limit"))) -;; The character classes have the Latin-1 version and the Latin-9 -;; version, which is probably enough. (defcustom copyright-regexp - "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ -\\|[Cc]opyright\\s *:?\\s *[]\\)\ + "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ +\\|[Cc]opyright\\s *:?\\s *©\\)\ \\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" "What your copyright notice looks like. The second \\( \\) construct must match the years." @@ -258,7 +256,7 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx." ;; For the copyright sign: ;; Local Variables: -;; coding: emacs-mule +;; coding: utf-8 ;; End: ;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el index add152adc4a..08799822a91 100644 --- a/lisp/emacs-lisp/generic.el +++ b/lisp/emacs-lisp/generic.el @@ -240,9 +240,9 @@ Some generic modes are defined in `generic-x.el'." (when (consp start) (setq end (cdr start)) (setq start (car start))) - (when (char-valid-p start) (setq start (char-to-string start))) + (when (characterp start) (setq start (char-to-string start))) (cond - ((char-valid-p end) (setq end (char-to-string end))) + ((characterp end) (setq end (char-to-string end))) ((zerop (length end)) (setq end "\n"))) ;; Setup the vars for `comment-region' diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 00f5bf5227a..18bd094e4d4 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -263,13 +263,21 @@ This means the number of non-shy regexp grouping constructs (map-char-table (lambda (c v) (when v - (if (= (1- c) end) (setq end c) - (if (> end (+ start 2)) + (if (consp c) + (if (= (1- (car c)) end) (setq end (cdr c)) + (if (> end (+ start 2)) + (setq charset (format "%s%c-%c" charset start end)) + (while (>= end start) + (setq charset (format "%s%c" charset start)) + (incf start))) + (setq start (car c) end (cdr c))) + (if (= (1- c) end) (setq end c) + (if (> end (+ start 2)) (setq charset (format "%s%c-%c" charset start end)) (while (>= end start) (setq charset (format "%s%c" charset start)) (incf start))) - (setq start c end c)))) + (setq start c end c))))) charmap) (when (>= end start) (if (> end (+ start 2)) |