commit bb7c182fdaf8553ffdc9162f322177ae2f7fa0c2 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Oct 10 00:17:11 2015 -0700 CHECK_IMPURE and PURE_P speedup * src/intervals.c (create_root_interval): Do CHECK_IMPURE only for strings; not needed for buffers. Prefer ! STRINGP to BUFFERP, for a tad more speed. * src/puresize.h (CHECK_IMPURE, PURE_P): Now inline functions instead of macros. (PURE_P): Don’t use XPNTR; that is now the caller’s responsibility. All callers changed. (CHECK_IMPURE): New argument PTR, to save us the work of running XPNTR. All callers changed. diff --git a/src/data.c b/src/data.c index eda6110..5ee40c5 100644 --- a/src/data.c +++ b/src/data.c @@ -560,7 +560,7 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, (register Lisp_Object cell, Lisp_Object newcar) { CHECK_CONS (cell); - CHECK_IMPURE (cell); + CHECK_IMPURE (cell, XCONS (cell)); XSETCAR (cell, newcar); return newcar; } @@ -570,7 +570,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, (register Lisp_Object cell, Lisp_Object newcdr) { CHECK_CONS (cell); - CHECK_IMPURE (cell); + CHECK_IMPURE (cell, XCONS (cell)); XSETCDR (cell, newcdr); return newcdr; } @@ -2215,7 +2215,7 @@ bool-vector. IDX starts at 0. */) CHECK_NUMBER (idx); idxval = XINT (idx); CHECK_ARRAY (array, Qarrayp); - CHECK_IMPURE (array); + CHECK_IMPURE (array, XVECTOR (array)); if (VECTORP (array)) { diff --git a/src/intervals.c b/src/intervals.c index 78e0f50..1c8dd41 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -91,11 +91,9 @@ create_root_interval (Lisp_Object parent) { INTERVAL new; - CHECK_IMPURE (parent); - new = make_interval (); - if (BUFFERP (parent)) + if (! STRINGP (parent)) { new->total_length = (BUF_Z (XBUFFER (parent)) - BUF_BEG (XBUFFER (parent))); @@ -103,15 +101,16 @@ create_root_interval (Lisp_Object parent) set_buffer_intervals (XBUFFER (parent), new); new->position = BEG; } - else if (STRINGP (parent)) + else { + CHECK_IMPURE (parent, XSTRING (parent)); new->total_length = SCHARS (parent); eassert (TOTAL_LENGTH (new) >= 0); set_string_intervals (parent, new); new->position = 0; } eassert (LENGTH (new) > 0); - + set_interval_object (new, parent); return new; diff --git a/src/keymap.c b/src/keymap.c index 6a8d129..81091f0 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -341,7 +341,7 @@ Return PARENT. PARENT should be nil or another keymap. */) If we came to the end, add the parent in PREV. */ if (!CONSP (list) || KEYMAPP (list)) { - CHECK_IMPURE (prev); + CHECK_IMPURE (prev, XCONS (prev)); XSETCDR (prev, parent); return parent; } @@ -750,7 +750,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) /* If we are preparing to dump, and DEF is a menu element with a menu item indicator, copy it to ensure it is not pure. */ - if (CONSP (def) && PURE_P (def) + if (CONSP (def) && PURE_P (XCONS (def)) && (EQ (XCAR (def), Qmenu_item) || STRINGP (XCAR (def)))) def = Fcons (XCAR (def), XCDR (def)); @@ -798,7 +798,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) { if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt)) { - CHECK_IMPURE (elt); + CHECK_IMPURE (elt, XVECTOR (elt)); ASET (elt, XFASTINT (idx), def); return def; } @@ -851,7 +851,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) } else if (EQ (idx, XCAR (elt))) { - CHECK_IMPURE (elt); + CHECK_IMPURE (elt, XCONS (elt)); XSETCDR (elt, def); return def; } @@ -895,7 +895,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) } else elt = Fcons (idx, def); - CHECK_IMPURE (insertion_point); + CHECK_IMPURE (insertion_point, XCONS (insertion_point)); XSETCDR (insertion_point, Fcons (elt, XCDR (insertion_point))); } } diff --git a/src/puresize.h b/src/puresize.h index b72fb6c..d0926c6 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -70,16 +70,21 @@ along with GNU Emacs. If not, see . */ #define PURESIZE (BASE_PURESIZE * PURESIZE_RATIO * PURESIZE_CHECKING_RATIO) #endif -/* Signal an error if OBJ is pure. */ -#define CHECK_IMPURE(obj) \ - { if (PURE_P (obj)) \ - pure_write_error (obj); } - extern _Noreturn void pure_write_error (Lisp_Object); - -/* Define PURE_P. */ extern EMACS_INT pure[]; -#define PURE_P(obj) \ - ((uintptr_t) XPNTR (obj) - (uintptr_t) pure <= PURESIZE) +/* True if PTR is pure. */ +INLINE bool +PURE_P (void *ptr) +{ + return (uintptr_t) (ptr) - (uintptr_t) pure <= PURESIZE; +} + +/* Signal an error if OBJ is pure. PTR is OBJ untagged. */ +INLINE void +CHECK_IMPURE (Lisp_Object obj, void *ptr) +{ + if (PURE_P (ptr)) + pure_write_error (obj); +} commit 1196e3fca6f9df107c76438b7d00090d19b13570 Author: Noah Friedman Date: Fri Oct 9 16:15:21 2015 -0700 (tramp-open-connection-setup-interactive-shell): Send -onlcr as well. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 433b2ba..7d24b54 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4153,7 +4153,7 @@ process to set up. VEC specifies the connection." ;; Disable tab and echo expansion. (tramp-message vec 5 "Setting up remote shell environment") - (tramp-send-command vec "stty tab0 -inlcr -echo kill '^U' erase '^H'" t) + (tramp-send-command vec "stty tab0 -inlcr -onlcr -echo kill '^U' erase '^H'" t) ;; Check whether the echo has really been disabled. Some ;; implementations, like busybox of embedded GNU/Linux, don't ;; support disabling. commit 1b5953e0fd070572ad1d0057000f298d55f804e5 Author: Stefan Monnier Date: Fri Oct 9 16:34:20 2015 -0400 * lisp/progmodes/cc-mode.el (c-after-font-lock-init): Only *move* our after-change-function, rather than re-adding it if it was removed. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 5c68de4..1b6a233 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1307,8 +1307,9 @@ Note that the style variables are always made local to the buffer." (defun c-after-font-lock-init () ;; Put on `font-lock-mode-hook'. This function ensures our after-change ;; function will get executed before the font-lock one. - (remove-hook 'after-change-functions 'c-after-change t) - (add-hook 'after-change-functions 'c-after-change nil t)) + (when (memq #'c-after-change after-change-functions) + (remove-hook 'after-change-functions #'c-after-change t) + (add-hook 'after-change-functions #'c-after-change nil t))) (defun c-font-lock-init () "Set up the font-lock variables for using the font-lock support in CC Mode. commit b40d703e8706a00b33e5f54eb2ffa3b42130a9ff Author: Stefan Monnier Date: Fri Oct 9 15:55:31 2015 -0400 * lisp/cedet/ede: Silence some compiler warnings * lisp/cedet/ede.el: Require cl-lib. Silence some compiler warnings. (ede-menu-obj-of-class-p): Use cl-some rather than `eval'. (ede-apply-object-keymap, ede-reset-all-buffers) (ede-auto-add-to-target): Use dolist. (ede-new, ede-flush-deleted-projects, ede-global-list-sanity-check): Use field names rather than initarg names in `oref'. (ede-load-project-file): Remove unused var `file'. (ede-map-any-target-p): Use cl-some rather than ede-map-targets. (ede-set): Remove unused var `a'. * lisp/cedet/ede/emacs.el: Silence some compiler warnings. (ede-project-autoload): Avoid the old-style "name" argument. (ede-emacs-find-matching-target): Use field names rather than initarg names in `oref'. * lisp/cedet/ede/linux.el: Silence some compiler warnings. (ede-linux-load, ede-project-autoload): Avoid the old-style "name" argument. (ede-linux-find-matching-target): Use field names rather than initarg names in `oref'. diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 27d7abe..76ec356 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -40,6 +40,7 @@ ;; (global-ede-mode t) (require 'cedet) +(require 'cl-lib) (require 'eieio) (require 'cl-generic) (require 'eieio-speedbar) @@ -259,10 +260,10 @@ Argument LIST-O-O is the list of objects to choose from." (defun ede-menu-obj-of-class-p (class) "Return non-nil if some member of `ede-object' is a child of CLASS." (if (listp ede-object) - (eval (cons 'or (mapcar (lambda (o) (obj-of-class-p o class)) ede-object))) + (cl-some (lambda (o) (obj-of-class-p o class)) ede-object) (obj-of-class-p ede-object class))) -(defun ede-build-forms-menu (menu-def) +(defun ede-build-forms-menu (_menu-def) "Create a sub menu for building different parts of an EDE system. Argument MENU-DEF is the menu definition to use." (easy-menu-filter-return @@ -306,7 +307,7 @@ Argument MENU-DEF is the menu definition to use." (append newmenu (list [ "Make distribution" ede-make-dist t ])) ))))) -(defun ede-target-forms-menu (menu-def) +(defun ede-target-forms-menu (_menu-def) "Create a target MENU-DEF based on the object belonging to this buffer." (easy-menu-filter-return (easy-menu-create-menu @@ -327,7 +328,7 @@ Argument MENU-DEF is the menu definition to use." ;; This is bad, but I'm not sure what else to do. (oref (car obj) menu))))))))) -(defun ede-project-forms-menu (menu-def) +(defun ede-project-forms-menu (_menu-def) "Create a target MENU-DEF based on the object belonging to this buffer." (easy-menu-filter-return (easy-menu-create-menu @@ -353,7 +354,7 @@ Argument MENU-DEF is the menu definition to use." menu) ))))) -(defun ede-configuration-forms-menu (menu-def) +(defun ede-configuration-forms-menu (_menu-def) "Create a submenu for selecting the default configuration for this project. The current default is in the current object's CONFIGURATION-DEFAULT slot. All possible configurations are in CONFIGURATIONS. @@ -388,7 +389,7 @@ but can also be used interactively." (eieio-object-name (ede-current-project)) newconfig)) -(defun ede-customize-forms-menu (menu-def) +(defun ede-customize-forms-menu (_menu-def) "Create a menu of the project, and targets that can be customized. Argument MENU-DEF is the definition of the current menu." (easy-menu-filter-return @@ -411,7 +412,7 @@ Argument MENU-DEF is the definition of the current menu." targ))))))) -(defun ede-apply-object-keymap (&optional default) +(defun ede-apply-object-keymap (&optional _default) "Add target specific keybindings into the local map. Optional argument DEFAULT indicates if this should be set to the default version of the keymap." @@ -419,14 +420,13 @@ version of the keymap." (proj ede-object-project)) (condition-case nil (let ((keys (ede-object-keybindings object))) - ;; Add keys for the project to whatever is in the current object - ;; so long as it isn't the same. - (when (not (eq object proj)) - (setq keys (append keys (ede-object-keybindings proj)))) - (while keys - (local-set-key (concat "\C-c." (car (car keys))) - (cdr (car keys))) - (setq keys (cdr keys)))) + (dolist (key + ;; Add keys for the project to whatever is in the current + ;; object so long as it isn't the same. + (if (eq object proj) + keys + (append keys (ede-object-keybindings proj)))) + (local-set-key (concat "\C-c." (car key)) (cdr key)))) (error nil)))) ;;; Menu building methods for building @@ -550,19 +550,15 @@ Sets buffer local variables for EDE." (defun ede-reset-all-buffers () "Reset all the buffers due to change in EDE." (interactive) - (let ((b (buffer-list))) - (while b - (when (buffer-file-name (car b)) - (with-current-buffer (car b) - ;; Reset all state variables - (setq ede-object nil - ede-object-project nil - ede-object-root-project nil) - ;; Now re-initialize this buffer. - (ede-initialize-state-current-buffer) - ) - ) - (setq b (cdr b))))) + (dolist (b (buffer-list)) + (when (buffer-file-name b) + (with-current-buffer b + ;; Reset all state variables + (setq ede-object nil + ede-object-project nil + ede-object-root-project nil) + ;; Now re-initialize this buffer. + (ede-initialize-state-current-buffer))))) ;;;###autoload (define-minor-mode global-ede-mode @@ -626,13 +622,10 @@ of objects with the `ede-want-file-p' method." (if (or (eq ede-auto-add-method 'never) (ede-ignore-file (buffer-file-name))) nil - (let (wants desires) - ;; Find all the objects. - (setq wants (oref (ede-current-project) targets)) - (while wants - (if (ede-want-file-p (car wants) (buffer-file-name)) - (setq desires (cons (car wants) desires))) - (setq wants (cdr wants))) + (let (desires) + (dolist (want (oref (ede-current-project) targets));Find all the objects. + (if (ede-want-file-p want (buffer-file-name)) + (push want desires))) (if desires (cond ((or (eq ede-auto-add-method 'ask) (and (eq ede-auto-add-method 'multi-ask) @@ -754,7 +747,7 @@ Optional argument NAME is the name to give this project." (r nil)) (while l (if cs - (if (eq (oref (car l) :class-sym) + (if (eq (oref (car l) class-sym) cs) (setq r (cons (car l) r))) (if (oref (car l) new-p) @@ -804,7 +797,7 @@ Optional argument NAME is the name to give this project." )) (inits (oref obj initializers))) ;; Force the name to match for new objects. - (eieio-object-set-name-string nobj (oref nobj :name)) + (eieio-object-set-name-string nobj (oref nobj name)) ;; Handle init args. (while inits (eieio-oset nobj (car inits) (car (cdr inits))) @@ -858,7 +851,7 @@ Different projects accept different arguments ARGS. Typically you can specify NAME, target TYPE, and AUTOADD, where AUTOADD is a string \"y\" or \"n\", which answers the y/n question done interactively." (interactive) - (apply 'project-new-target (ede-current-project) args) + (apply #'project-new-target (ede-current-project) args) (when (and buffer-file-name (not (file-directory-p buffer-file-name))) (setq ede-object nil) @@ -1004,21 +997,21 @@ Argument PROMPT is the prompt to use when querying the user for a target." "Make sure placeholder THIS is replaced with the real thing, and pass through." (project-add-file this file)) -(cl-defmethod project-add-file ((ot ede-target) file) +(cl-defmethod project-add-file ((ot ede-target) _file) "Add the current buffer into project project target OT. Argument FILE is the file to add." (error "add-file not supported by %s" (eieio-object-name ot))) -(cl-defmethod project-remove-file ((ot ede-target) fnnd) +(cl-defmethod project-remove-file ((ot ede-target) _fnnd) "Remove the current buffer from project target OT. Argument FNND is an argument." (error "remove-file not supported by %s" (eieio-object-name ot))) -(cl-defmethod project-edit-file-target ((ot ede-target)) +(cl-defmethod project-edit-file-target ((_ot ede-target)) "Edit the target OT associated with this file." (find-file (oref (ede-current-project) file))) -(cl-defmethod project-new-target ((proj ede-project) &rest args) +(cl-defmethod project-new-target ((proj ede-project) &rest _args) "Create a new target. It is up to the project PROJ to get the name." (error "new-target not supported by %s" (eieio-object-name proj))) @@ -1030,12 +1023,12 @@ Argument FNND is an argument." "Delete the current target OT from its parent project." (error "add-file not supported by %s" (eieio-object-name ot))) -(cl-defmethod project-compile-project ((obj ede-project) &optional command) +(cl-defmethod project-compile-project ((obj ede-project) &optional _command) "Compile the entire current project OBJ. Argument COMMAND is the command to use when compiling." (error "compile-project not supported by %s" (eieio-object-name obj))) -(cl-defmethod project-compile-target ((obj ede-target) &optional command) +(cl-defmethod project-compile-target ((obj ede-target) &optional _command) "Compile the current target OBJ. Argument COMMAND is the command to use for compiling the target." (error "compile-target not supported by %s" (eieio-object-name obj))) @@ -1095,7 +1088,7 @@ Flush the dead projects from the project cache." (interactive) (let ((dead nil)) (dolist (P ede-projects) - (when (not (file-exists-p (oref P :file))) + (when (not (file-exists-p (oref P file))) (add-to-list 'dead P))) (dolist (D dead) (ede-delete-project-from-global-list D)) @@ -1108,9 +1101,9 @@ Flush the dead projects from the project cache." (interactive) (let ((scanned nil)) (dolist (P ede-projects) - (if (member (oref P :directory) scanned) - (error "Duplicate project (by dir) found in %s!" (oref P :directory)) - (push (oref P :directory) scanned))) + (if (member (oref P directory) scanned) + (error "Duplicate project (by dir) found in %s!" (oref P directory)) + (push (oref P directory) scanned))) (unless ede--disable-inode (setq scanned nil) (dolist (P ede-projects) @@ -1135,8 +1128,7 @@ Optional ROOTRETURN will return the root project for DIR." ;; Do the load ;;(message "EDE LOAD : %S" file) - (let* ((file dir) - (path (file-name-as-directory (expand-file-name dir))) + (let* ((path (file-name-as-directory (expand-file-name dir))) (detect (or detectin (ede-directory-project-cons path))) (autoloader nil) (toppath nil) @@ -1302,7 +1294,7 @@ could become slow in time." Handles complex path issues." (member (ede-convert-path this (buffer-file-name buffer)) source)) -(cl-defmethod ede-buffer-mine ((this ede-project) buffer) +(cl-defmethod ede-buffer-mine ((_this ede-project) _buffer) "Return non-nil if object THIS lays claim to the file in BUFFER." nil) @@ -1375,7 +1367,7 @@ See also `ede-map-all-subprojects'." "For object THIS, execute PROC on THIS and all subprojects. This function also applies PROC to sub-sub projects. See also `ede-map-subprojects'." - (apply 'append + (apply #'append (list (funcall allproc this)) (ede-map-subprojects this @@ -1392,7 +1384,7 @@ See also `ede-map-subprojects'." (cl-defmethod ede-map-any-target-p ((this ede-project) proc) "For project THIS, map PROC to all targets and return if any non-nil. Return the first non-nil value returned by PROC." - (eval (cons 'or (ede-map-targets this proc)))) + (cl-some proc (oref this targets))) ;;; Some language specific methods. @@ -1401,15 +1393,15 @@ Return the first non-nil value returned by PROC." ;; configuring items for Semantic. ;; Generic paths -(cl-defmethod ede-system-include-path ((this ede-project)) +(cl-defmethod ede-system-include-path ((_this ede-project)) "Get the system include path used by project THIS." nil) -(cl-defmethod ede-system-include-path ((this ede-target)) +(cl-defmethod ede-system-include-path ((_this ede-target)) "Get the system include path used by project THIS." nil) -(cl-defmethod ede-source-paths ((this ede-project) mode) +(cl-defmethod ede-source-paths ((_this ede-project) _mode) "Get the base to all source trees in the current project for MODE. For example, /src for sources of c/c++, Java, etc, and /doc for doc sources." @@ -1437,20 +1429,20 @@ and /doc for doc sources." (message "Choosing preprocessor syms for project %s" (eieio-object-name (car objs))))))) -(cl-defmethod ede-system-include-path ((this ede-project)) +(cl-defmethod ede-system-include-path ((_this ede-project)) "Get the system include path used by project THIS." nil) -(cl-defmethod ede-preprocessor-map ((this ede-project)) +(cl-defmethod ede-preprocessor-map ((_this ede-project)) "Get the pre-processor map for project THIS." nil) -(cl-defmethod ede-preprocessor-map ((this ede-target)) +(cl-defmethod ede-preprocessor-map ((_this ede-target)) "Get the pre-processor map for project THIS." nil) ;; Java -(cl-defmethod ede-java-classpath ((this ede-project)) +(cl-defmethod ede-java-classpath ((_this ede-project)) "Return the classpath for this project." ;; @TODO - Can JDEE add something here? nil) @@ -1463,8 +1455,7 @@ and /doc for doc sources." If VARIABLE is not project local, just use set. Optional argument PROJ is the project to use, instead of `ede-current-project'." (interactive "sVariable: \nxExpression: ") - (let ((p (or proj (ede-toplevel))) - a) + (let ((p (or proj (ede-toplevel)))) ;; Make the change (ede-make-project-local-variable variable p) (ede-set-project-local-variable variable value p) @@ -1514,7 +1505,7 @@ It does not apply the value to buffers." (make-local-variable (car v)) (set (car v) (cdr v))))) -(cl-defmethod ede-commit-local-variables ((proj ede-project)) +(cl-defmethod ede-commit-local-variables ((_proj ede-project)) "Commit change to local variables in PROJ." nil) diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index ca58810..c3caf98 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -41,7 +41,7 @@ ;; @TODO - get rid of this. Stuck in loaddefs right now. -(defun ede-emacs-project-root (&optional dir) +(defun ede-emacs-project-root (&optional _dir) "Get the root directory for DIR." nil) @@ -99,7 +99,7 @@ m4_define(\\[SXEM4CS_BETA_VERSION\\], \\[\\([0-9]+\\)\\])") "Project Type for the Emacs source code." :method-invocation-order :depth-first) -(defun ede-emacs-load (dir &optional rootproj) +(defun ede-emacs-load (dir &optional _rootproj) "Return an Emacs Project object if there is a match. Return nil if there isn't one. Argument DIR is the directory it is created for. @@ -116,14 +116,14 @@ ROOTPROJ is nil, since there is only one project." ;;;###autoload (ede-add-project-autoload - (ede-project-autoload "emacs" - :name "EMACS ROOT" - :file 'ede/emacs - :proj-file "src/emacs.c" - :load-type 'ede-emacs-load - :class-sym 'ede-emacs-project - :new-p nil - :safe-p t) + (make-instance 'ede-project-autoload + :name "EMACS ROOT" + :file 'ede/emacs + :proj-file "src/emacs.c" + :load-type 'ede-emacs-load + :class-sym 'ede-emacs-project + :new-p nil + :safe-p t) 'unique) (defclass ede-emacs-target-c (ede-target) @@ -142,7 +142,7 @@ All directories need at least one target.") All directories need at least one target.") (cl-defmethod initialize-instance ((this ede-emacs-project) - &rest fields) + &rest _fields) "Make sure the targets slot is bound." (cl-call-next-method) (unless (slot-boundp this 'targets) @@ -151,7 +151,7 @@ All directories need at least one target.") ;;; File Stuff ;; (cl-defmethod ede-project-root-directory ((this ede-emacs-project) - &optional file) + &optional _file) "Return the root for THIS Emacs project with file." (ede-up-directory (file-name-directory (oref this file)))) @@ -160,7 +160,7 @@ All directories need at least one target.") this) (cl-defmethod ede-find-subproject-for-directory ((proj ede-emacs-project) - dir) + _dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -171,7 +171,7 @@ All directories need at least one target.") (let ((match nil)) (dolist (T targets) (when (and (object-of-class-p T class) - (string= (oref T :path) dir)) + (string= (oref T path) dir)) (setq match T) )) match)) diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index 6887d38..edfa364 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -189,7 +189,7 @@ until Linux is built for the first time." (cons bdir "include/generated/uapi")))) ;;;###autoload -(defun ede-linux-load (dir &optional rootproj) +(defun ede-linux-load (dir &optional _rootproj) "Return an Linux Project object if there is a match. Return nil if there isn't one. Argument DIR is the directory it is created for. @@ -198,8 +198,7 @@ ROOTPROJ is nil, since there is only one project." (let* ((bdir (ede-linux--get-build-directory dir)) (arch (ede-linux--get-architecture dir bdir)) (include-path (ede-linux--include-path dir bdir arch))) - (ede-linux-project - "Linux" + (make-instance 'ede-linux-project :name "Linux" :version (ede-linux-version dir) :directory (file-name-as-directory dir) @@ -211,14 +210,14 @@ ROOTPROJ is nil, since there is only one project." ;;;###autoload (ede-add-project-autoload - (ede-project-autoload "linux" - :name "LINUX ROOT" - :file 'ede/linux - :proj-file "scripts/ver_linux" - :load-type 'ede-linux-load - :class-sym 'ede-linux-project - :new-p nil - :safe-p t) + (make-instance 'ede-project-autoload + :name "LINUX ROOT" + :file 'ede/linux + :proj-file "scripts/ver_linux" + :load-type 'ede-linux-load + :class-sym 'ede-linux-project + :new-p nil + :safe-p t) 'unique) (defclass ede-linux-target-c (ede-target) @@ -232,7 +231,7 @@ All directories need at least one target.") All directories need at least one target.") (cl-defmethod initialize-instance ((this ede-linux-project) - &rest fields) + &rest _fields) "Make sure the targets slot is bound." (cl-call-next-method) (unless (slot-boundp this 'targets) @@ -241,7 +240,7 @@ All directories need at least one target.") ;;; File Stuff ;; (cl-defmethod ede-project-root-directory ((this ede-linux-project) - &optional file) + &optional _file) "Return the root for THIS Linux project with file." (ede-up-directory (file-name-directory (oref this file)))) @@ -250,7 +249,7 @@ All directories need at least one target.") this) (cl-defmethod ede-find-subproject-for-directory ((proj ede-linux-project) - dir) + _dir) "Return PROJ, for handling all subdirs below DIR." proj) @@ -261,7 +260,7 @@ All directories need at least one target.") (let ((match nil)) (dolist (T targets) (when (and (object-of-class-p T class) - (string= (oref T :path) dir)) + (string= (oref T path) dir)) (setq match T) )) match)) diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index a831087..664e91d 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el @@ -93,11 +93,11 @@ don't do it. A value of nil means to just do it.") (ede-map-all-subprojects this (lambda (sp) - (ede-map-targets sp 'ede-proj-flush-autoconf))) + (ede-map-targets sp #'ede-proj-flush-autoconf))) (ede-map-all-subprojects this (lambda (sp) - (ede-map-targets this 'ede-proj-tweak-autoconf))) + (ede-map-targets this #'ede-proj-tweak-autoconf))) ;; Now save (save-buffer) (setq postcmd "autoreconf -f -i;") commit 69b3238af2c6884d4ebbdb03603804e61fd45eba Author: Stefan Monnier Date: Fri Oct 9 15:35:30 2015 -0400 * lisp/textmodes/reftex.el: Silence byte-compiler warnings. diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index f567963..6641523 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1705,7 +1705,7 @@ When DIE is non-nil, throw an error if file not found." (defvar message-stack) (if (and (featurep 'xemacs) (not (fboundp 'current-message))) - (defun current-message (&optional frame) + (defun current-message (&optional _frame) (cdr (car message-stack)))) (defun reftex-visited-files (list) @@ -2047,7 +2047,7 @@ IGNORE-WORDS List of words which should be removed from the string." (message "Sorry: cannot refontify RefTeX Select buffer.")))) (rename-buffer oldname)))) -(defun reftex-select-font-lock-fontify-region (beg end &optional loudly) +(defun reftex-select-font-lock-fontify-region (beg end &optional _loudly) ;; Fontify a region, but only lines starting with a dot. (let ((func (if (fboundp 'font-lock-default-fontify-region) 'font-lock-default-fontify-region @@ -2059,7 +2059,7 @@ IGNORE-WORDS List of words which should be removed from the string." (funcall func beg1 end1 nil) (goto-char end1)))) -(defun reftex-select-font-lock-unfontify (&rest ignore) t) +(defun reftex-select-font-lock-unfontify (&rest _ignore) t) (defun reftex-verified-face (&rest faces) ;; Return the first valid face in FACES, or nil if none is valid. @@ -2341,6 +2341,7 @@ output buffer into your mail program, as it gives us important information about your RefTeX version and configuration." (interactive) (require 'reporter) + (defvar reporter-prompt-for-summary-p) (let ((reporter-prompt-for-summary-p "Bug report subject: ")) (reporter-submit-bug-report "bug-auctex@gnu.org, bug-gnu-emacs@gnu.org" commit d72d97fcbe4f9a989d3f214eed8036bd52ff0141 Author: Stefan Monnier Date: Fri Oct 9 15:30:27 2015 -0400 * lisp/progmodes/prolog.el: Avoid indenting too much, after ":-" (prolog-smie-rules): Try and avoid indenting too far after ":-". diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 81aeb8d..61d3a3c 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -988,7 +988,16 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." (smie-indent-backward-token) ;Skip ! (equal ":-" (car (smie-indent-backward-token)))) (smie-rule-parent prolog-indent-width))) - (`(:after . ,(or `":-" `"-->")) prolog-indent-width))) + (`(:after . ":-") + (if (bolp) + (save-excursion + (smie-indent-forward-token) + (skip-chars-forward " \t") + (if (eolp) + prolog-indent-width + (min prolog-indent-width (current-column)))) + prolog-indent-width)) + (`(:after . "-->") prolog-indent-width))) ;;------------------------------------------------------------------- commit af45926d66d303fdc4c2c3ebbc820b4a54d9e4a0 Author: Eli Zaretskii Date: Fri Oct 9 21:33:20 2015 +0300 Update case-table and categories of recently added characters * lisp/international/characters.el: Update information about Latin Extended-C, Latin Extended-D, Latin Extended-E, Cyrillic Extended, Georgian, Glagolitic, Deseret, Old Hungarian, and Warang Citi blocks. (Byug#21654) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 310384a..e4f7e7c 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -649,6 +649,68 @@ with L, LRE, or LRO Unicode bidi character type.") (set-case-syntax-pair c (1+ c) tbl)) (setq c (1+ c))) + ;; Latin Extended-C + (setq c #x2C60) + (while (<= c #x2C7F) + (modify-category-entry c ?l) + (setq c (1+ c))) + + (let ((pair-ranges '((#x2C60 . #x2C61) + (#x2C67 . #x2C6C) + (#x2C72 . #x2C73) + (#x2C75 . #x2C76)))) + (dolist (elt pair-ranges) + (let ((from (car elt)) (to (cdr elt))) + (while (< from to) + (set-case-syntax-pair from (1+ from) tbl) + (setq from (+ from 2)))))) + + (set-case-syntax-pair ?Ɫ ?ɫ tbl) + (set-case-syntax-pair ?Ᵽ ?ᵽ tbl) + (set-case-syntax-pair ?Ɽ ?ɽ tbl) + (set-case-syntax-pair ?Ɑ ?ɑ tbl) + (set-case-syntax-pair ?Ɱ ?ɱ tbl) + (set-case-syntax-pair ?Ɐ ?ɐ tbl) + (set-case-syntax-pair ?Ɒ ?ɒ tbl) + (set-case-syntax-pair ?Ȿ ?ȿ tbl) + (set-case-syntax-pair ?Ɀ ?ɀ tbl) + + ;; Latin Extended-D + (setq c #xA720) + (while (<= c #xA7FF) + (modify-category-entry c ?l) + (setq c (1+ c))) + + (let ((pair-ranges '((#xA722 . #xA72F) + (#xA732 . #xA76F) + (#xA779 . #xA77C) + (#xA77E . #xA787) + (#xA78B . #xA78E) + (#xA790 . #xA793) + (#xA796 . #xA7A9) + (#xA7B4 . #xA7B7)))) + (dolist (elt pair-ranges) + (let ((from (car elt)) (to (cdr elt))) + (while (< from to) + (set-case-syntax-pair from (1+ from) tbl) + (setq from (+ from 2)))))) + + (set-case-syntax-pair ?Ᵹ ?ᵹ tbl) + (set-case-syntax-pair ?Ɦ ?ɦ tbl) + (set-case-syntax-pair ?Ɜ ?ɜ tbl) + (set-case-syntax-pair ?Ɡ ?ɡ tbl) + (set-case-syntax-pair ?Ɬ ?ɬ tbl) + (set-case-syntax-pair ?Ʞ ?ʞ tbl) + (set-case-syntax-pair ?Ʇ ?ʇ tbl) + (set-case-syntax-pair ?Ʝ ?ʝ tbl) + (set-case-syntax-pair ?Ꭓ ?ꭓ tbl) + + ;; Latin Extended-E + (setq c #xAB30) + (while (<= c #xAB64) + (modify-category-entry c ?l) + (setq c (1+ c))) + ;; Greek (modify-category-entry '(#x0370 . #x03ff) ?g) (setq c #x0370) @@ -724,14 +786,29 @@ with L, LRE, or LRO Unicode bidi character type.") (and (zerop (% c 2)) (or (and (>= c #x0460) (<= c #x0480)) (and (>= c #x048c) (<= c #x04be)) - (and (>= c #x04d0) (<= c #x04f4))) + (and (>= c #x04d0) (<= c #x052e))) (set-case-syntax-pair c (1+ c) tbl)) (setq c (1+ c))) (set-case-syntax-pair ?Ӂ ?ӂ tbl) (set-case-syntax-pair ?Ӄ ?ӄ tbl) (set-case-syntax-pair ?Ӈ ?ӈ tbl) (set-case-syntax-pair ?Ӌ ?ӌ tbl) - (set-case-syntax-pair ?Ӹ ?ӹ tbl) + + (modify-category-entry '(#xA640 . #xA69F) ?y) + (setq c #xA640) + (while (<= c #xA66C) + (set-case-syntax-pair c (+ c 1) tbl) + (setq c (+ c 2))) + (setq c #xA680) + (while (<= c #xA69A) + (set-case-syntax-pair c (+ c 1) tbl) + (setq c (+ c 2))) + + ;; Georgian + (setq c #x10A0) + (while (<= c #x10CD) + (set-case-syntax-pair c (+ c #x1C60) tbl) + (setq c (1+ c))) ;; general punctuation (setq c #x2000) @@ -792,6 +869,12 @@ with L, LRE, or LRO Unicode bidi character type.") (modify-category-entry (+ c 26) ?l) (setq c (1+ c))) + ;; Glagolitic + (setq c #x2C00) + (while (<= c #x2C2E) + (set-case-syntax-pair c (+ c 48) tbl) + (setq c (1+ c))) + ;; Coptic (let ((pair-ranges '((#x2C80 . #x2CE2) (#x2CEB . #x2CF2)))) @@ -814,6 +897,24 @@ with L, LRE, or LRO Unicode bidi character type.") (modify-category-entry (+ c #x20) ?l) (setq c (1+ c))) + ;; Deseret + (setq c #x10400) + (while (<= c #x10427) + (set-case-syntax-pair c (+ c 28) tbl) + (setq c (1+ c))) + + ;; Old Hungarian + (setq c #x10c80) + (while (<= c #x10cb2) + (set-case-syntax-pair c (+ c #x40) tbl) + (setq c (1+ c))) + + ;; Warang Citi + (setq c #x118a0) + (while (<= c #x118bf) + (set-case-syntax-pair c (+ c #x20) tbl) + (setq c (1+ c))) + ;; Combining diacritics (modify-category-entry '(#x300 . #x362) ?^) ;; Combining marks commit 4a1a98af5578a08515a11d8feb87b41657a1b44c Author: Glenn Morris Date: Fri Oct 9 06:18:27 2015 -0400 ; Auto-commit of loaddefs files. diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index fb96c6c..f567963 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -2446,7 +2446,7 @@ of ENTRY-LIST is a list of cons cells (\"MACRONAME\" . LEVEL). See ;;;*** -;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "751df6ee674ea533b755e8cda4ad1cf8") +;;;### (autoloads nil "reftex-cite" "reftex-cite.el" "7eaa61c05a6578999ea68f1be0fbcf49") ;;; Generated autoloads from reftex-cite.el (autoload 'reftex-default-bibliography "reftex-cite" "\ commit e6013e8c8f3de0ca39c17a2da95346b4a320e6d0 Author: Martin Rudalics Date: Fri Oct 9 11:55:06 2015 +0200 In adjust_frame_size don't count minibuffer height twice (Bug#21643) * src/frame.c (adjust_frame_size): In minibuffer-only windows don't count minibuffer height twice. (Bug#21643) diff --git a/src/frame.c b/src/frame.c index f1a78fb..77ead08 100644 --- a/src/frame.c +++ b/src/frame.c @@ -396,7 +396,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, int old_windows_width = WINDOW_PIXEL_WIDTH (r); int old_windows_height = (WINDOW_PIXEL_HEIGHT (r) - + (FRAME_HAS_MINIBUF_P (f) + + ((FRAME_HAS_MINIBUF_P (f) && !FRAME_MINIBUF_ONLY_P (f)) ? WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_MINIBUF_WINDOW (f))) : 0)); int new_windows_width, new_windows_height;