------------------------------------------------------------ revno: 117022 committer: Thien-Thi Nguyen branch nick: master timestamp: Fri 2014-04-25 01:18:40 +0200 message: Warn against renaming git-bzr remote; nfc. * admin/notes/bzr (Using git-bzr): ...here, in subsection "remote name". diff: === modified file 'admin/notes/bzr' --- admin/notes/bzr 2014-04-17 21:20:51 +0000 +++ admin/notes/bzr 2014-04-24 23:18:40 +0000 @@ -388,3 +388,11 @@ http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg00436.html which includes a provisional patch to git-remote-bzr to do that. + +** remote name + +Although Git itself is agnostic about what names you choose for +the remote repo, it seems git-bzr is more likely to get confused. +After the clone as described above, the remote name is "origin"; +changing it is Not Recommended. [Insert 9-hour high-entropy then +mysterious bug w/ JSON parsing errors anecdote here. --ttn] ------------------------------------------------------------ revno: 117021 committer: Thien-Thi Nguyen branch nick: master timestamp: Fri 2014-04-25 00:37:28 +0200 message: Improve Scheme font-locking for (define ((foo ...) ...) ...). * lisp/progmodes/scheme.el (scheme-font-lock-keywords-1): To find the declared object, ignore zero or more parens, not zero or one. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-24 15:34:26 +0000 +++ lisp/ChangeLog 2014-04-24 22:37:28 +0000 @@ -1,3 +1,10 @@ +2014-04-25 Thien-Thi Nguyen + + Improve Scheme font-locking for (define ((foo ...) ...) ...). + + * progmodes/scheme.el (scheme-font-lock-keywords-1): To find + the declared object, ignore zero or more parens, not zero or one. + 2014-04-24 Leo Liu * progmodes/xscheme.el (xscheme-expressions-ring) === modified file 'lisp/progmodes/scheme.el' --- lisp/progmodes/scheme.el 2014-04-24 15:34:26 +0000 +++ lisp/progmodes/scheme.el 2014-04-24 22:37:28 +0000 @@ -284,7 +284,9 @@ "\\|-module" "\\)\\)\\>" ;; Any whitespace and declared object. - "[ \t]*(?" + ;; The "(*" is for curried definitions, e.g., + ;; (define ((sum a) b) (+ a b)) + "[ \t]*(*" "\\(\\sw+\\)?") '(1 font-lock-keyword-face) '(6 (cond ((match-beginning 3) font-lock-function-name-face) ------------------------------------------------------------ revno: 117020 committer: Leo Liu branch nick: trunk timestamp: Thu 2014-04-24 23:34:26 +0800 message: * progmodes/scheme.el (would-be-symbol, next-sexp-as-string): Comment out unused functions. * progmodes/xscheme.el (xscheme-expressions-ring) (xscheme-expressions-ring-yank-pointer, xscheme-running-p) (xscheme-control-g-disabled-p, xscheme-process-filter-state) (xscheme-allow-output-p, xscheme-prompt) (xscheme-string-accumulator, xscheme-mode-string): Use defvar-local. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-24 14:04:36 +0000 +++ lisp/ChangeLog 2014-04-24 15:34:26 +0000 @@ -1,3 +1,14 @@ +2014-04-24 Leo Liu + + * progmodes/xscheme.el (xscheme-expressions-ring) + (xscheme-expressions-ring-yank-pointer, xscheme-running-p) + (xscheme-control-g-disabled-p, xscheme-process-filter-state) + (xscheme-allow-output-p, xscheme-prompt) + (xscheme-string-accumulator, xscheme-mode-string): Use defvar-local. + + * progmodes/scheme.el (would-be-symbol, next-sexp-as-string): + Comment out unused functions. + 2014-04-24 Stefan Monnier * info.el: Use lexical-binding and cl-lib. === modified file 'lisp/progmodes/scheme.el' --- lisp/progmodes/scheme.el 2014-03-17 06:22:58 +0000 +++ lisp/progmodes/scheme.el 2014-04-24 15:34:26 +0000 @@ -1,4 +1,4 @@ -;;; scheme.el --- Scheme (and DSSSL) editing mode +;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t; -*- ;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software ;; Foundation, Inc. @@ -495,20 +495,20 @@ ;;; Let is different in Scheme -(defun would-be-symbol (string) - (not (string-equal (substring string 0 1) "("))) +;; (defun scheme-would-be-symbol (string) +;; (not (string-equal (substring string 0 1) "("))) -(defun next-sexp-as-string () - ;; Assumes that it is protected by a save-excursion - (forward-sexp 1) - (let ((the-end (point))) - (backward-sexp 1) - (buffer-substring (point) the-end))) +;; (defun scheme-next-sexp-as-string () +;; ;; Assumes that it is protected by a save-excursion +;; (forward-sexp 1) +;; (let ((the-end (point))) +;; (backward-sexp 1) +;; (buffer-substring (point) the-end))) ;; This is correct but too slow. ;; The one below works almost always. ;;(defun scheme-let-indent (state indent-point) -;; (if (would-be-symbol (next-sexp-as-string)) +;; (if (scheme-would-be-symbol (scheme-next-sexp-as-string)) ;; (scheme-indent-specform 2 state indent-point) ;; (scheme-indent-specform 1 state indent-point))) === modified file 'lisp/progmodes/xscheme.el' --- lisp/progmodes/xscheme.el 2014-02-10 01:34:22 +0000 +++ lisp/progmodes/xscheme.el 2014-04-24 15:34:26 +0000 @@ -1,4 +1,4 @@ -;;; xscheme.el --- run MIT Scheme under Emacs +;;; xscheme.el --- run MIT Scheme under Emacs -*- lexical-binding: t; -*- ;; Copyright (C) 1986-1987, 1989-1990, 2001-2014 Free Software ;; Foundation, Inc. @@ -49,13 +49,13 @@ (defvar xscheme-expressions-ring-max 30 "Maximum length of Scheme expressions ring.") -(defvar xscheme-expressions-ring nil +(defvar-local xscheme-expressions-ring nil "List of expressions recently transmitted to the Scheme process.") -(defvar xscheme-expressions-ring-yank-pointer nil +(defvar-local xscheme-expressions-ring-yank-pointer nil "The tail of the Scheme expressions ring whose car is the last thing yanked.") -(defvar xscheme-running-p nil +(defvar-local xscheme-running-p nil "This variable, if nil, indicates that the scheme process is waiting for input. Otherwise, it is busy evaluating something.") @@ -64,7 +64,7 @@ control-g interrupts were signaled. Do not allow more control-g's to be signaled until the scheme process acknowledges receipt.") -(defvar xscheme-control-g-disabled-p nil +(defvar-local xscheme-control-g-disabled-p nil "This variable, if non-nil, indicates that a control-g is being processed by the scheme process, so additional control-g's are to be ignored.") @@ -78,37 +78,26 @@ (defvar xscheme-runlight "") (defvar xscheme-runlight-string nil) -(defvar xscheme-process-filter-state 'idle +(defvar-local xscheme-process-filter-state 'idle "State of scheme process escape reader state machine: idle waiting for an escape sequence reading-type received an altmode but nothing else reading-string reading prompt string") -(defvar xscheme-allow-output-p t +(defvar-local xscheme-allow-output-p t "This variable, if nil, prevents output from the scheme process from being inserted into the process-buffer.") -(defvar xscheme-prompt "" +(defvar-local xscheme-prompt "" "The current scheme prompt string.") -(defvar xscheme-string-accumulator "" +(defvar-local xscheme-string-accumulator "" "Accumulator for the string being received from the scheme process.") -(defvar xscheme-mode-string nil) -(setq-default scheme-mode-line-process - '("" xscheme-runlight)) +(defvar-local xscheme-mode-string nil) +(setq-default scheme-mode-line-process '("" xscheme-runlight)) +(make-variable-buffer-local 'scheme-mode-line-process) -(mapc 'make-variable-buffer-local - '(xscheme-expressions-ring - xscheme-expressions-ring-yank-pointer - xscheme-process-filter-state - xscheme-running-p - xscheme-control-g-disabled-p - xscheme-allow-output-p - xscheme-prompt - xscheme-string-accumulator - xscheme-mode-string - scheme-mode-line-process)) (defgroup xscheme nil "Major mode for editing Scheme and interacting with MIT's C-Scheme." ------------------------------------------------------------ revno: 117019 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-04-24 10:04:36 -0400 message: * lisp/info.el: Use lexical-binding and cl-lib. Use defvar-local and setq-local instead of make-local-variable. (Info-apropos-matches): Avoid add-to-list. (Info-edit-mode-map): Fix obsolescence call to Info-edit-map. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-04-24 02:37:02 +0000 +++ lisp/ChangeLog 2014-04-24 14:04:36 +0000 @@ -1,3 +1,10 @@ +2014-04-24 Stefan Monnier + + * info.el: Use lexical-binding and cl-lib. + Use defvar-local and setq-local instead of make-local-variable. + (Info-apropos-matches): Avoid add-to-list. + (Info-edit-mode-map): Fix obsolescence call to Info-edit-map. + 2014-04-24 Daniel Colascione * progmodes/sh-script.el (sh-builtins): Add coproc to list of bash builtins. === modified file 'lisp/info.el' --- lisp/info.el 2014-03-21 07:14:08 +0000 +++ lisp/info.el 2014-04-24 14:04:36 +0000 @@ -1,4 +1,4 @@ -;; info.el --- info package for Emacs +;; info.el --- Info package for Emacs -*- lexical-binding:t -*- ;; Copyright (C) 1985-1986, 1992-2014 Free Software Foundation, Inc. @@ -32,17 +32,19 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup info nil "Info subsystem." :group 'help :group 'docs) -(defvar Info-history nil +(defvar-local Info-history nil "Stack of Info nodes user has visited. Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") -(defvar Info-history-forward nil +(defvar-local Info-history-forward nil "Stack of Info nodes user has visited with `Info-history-back' command. Each element of the stack is a list (FILENAME NODENAME BUFFERPOS).") @@ -375,33 +377,33 @@ (make-obsolete-variable 'Info-edit-mode-hook "editing Info nodes by hand is not recommended." "24.4") -(defvar Info-current-file nil +(defvar-local Info-current-file nil "Info file that Info is now looking at, or nil. This is the name that was specified in Info, not the actual file name. It doesn't contain directory names or file name extensions added by Info.") -(defvar Info-current-subfile nil +(defvar-local Info-current-subfile nil "Info subfile that is actually in the *info* buffer now. It is nil if current Info file is not split into subfiles.") -(defvar Info-current-node nil +(defvar-local Info-current-node nil "Name of node that Info is now looking at, or nil.") -(defvar Info-tag-table-marker nil +(defvar-local Info-tag-table-marker nil "Marker pointing at beginning of current Info file's tag table. Marker points nowhere if file has no tag table.") -(defvar Info-tag-table-buffer nil +(defvar-local Info-tag-table-buffer nil "Buffer used for indirect tag tables.") -(defvar Info-current-file-completions nil +(defvar-local Info-current-file-completions nil "Cached completion list for current Info file.") (defvar Info-file-completions nil "Cached completion alist of visited Info files. Each element of the alist is (FILE . COMPLETIONS)") -(defvar Info-file-supports-index-cookies nil +(defvar-local Info-file-supports-index-cookies nil "Non-nil if current Info file supports index cookies.") (defvar Info-file-supports-index-cookies-list nil @@ -409,7 +411,7 @@ Each element of the list is a list (FILENAME SUPPORTS-INDEX-COOKIES) where SUPPORTS-INDEX-COOKIES can be either t or nil.") -(defvar Info-index-alternatives nil +(defvar-local Info-index-alternatives nil "List of possible matches for last `Info-index' command.") (defvar Info-point-loc nil @@ -455,7 +457,7 @@ symbols `find-node' that define what HANDLER function to call instead of calling the default corresponding function to override it.") -(defvar Info-current-node-virtual nil +(defvar-local Info-current-node-virtual nil "Non-nil if the current Info node is virtual.") (defun Info-virtual-file-p (filename) @@ -954,10 +956,10 @@ (unless nodename (setq nodename "Top")) (info-initialize) (Info-mode) - (set (make-local-variable 'Info-current-file) - (or buffer-file-name - ;; If called on a non-file buffer, make a fake file name. - (concat default-directory (buffer-name)))) + (setq Info-current-file + (or buffer-file-name + ;; If called on a non-file buffer, make a fake file name. + (concat default-directory (buffer-name)))) (Info-find-node-2 nil nodename)) (defun Info-revert-find-node (filename nodename) @@ -1091,7 +1093,7 @@ (set-marker Info-tag-table-marker nil) (setq buffer-read-only t) (set-buffer-modified-p nil) - (set (make-local-variable 'Info-current-node-virtual) t))) + (setq Info-current-node-virtual t))) ((not (and ;; Reread a file when moving from a virtual node. (not Info-current-node-virtual) @@ -1101,7 +1103,7 @@ (let ((inhibit-read-only t)) (when Info-current-node-virtual ;; When moving from a virtual node. - (set (make-local-variable 'Info-current-node-virtual) nil) + (setq Info-current-node-virtual nil) (if (null filename) (setq filename Info-current-file))) (setq Info-current-file nil @@ -1112,7 +1114,7 @@ (info-insert-file-contents filename nil) (setq default-directory (file-name-directory filename)) (set-buffer-modified-p nil) - (set (make-local-variable 'Info-file-supports-index-cookies) + (setq Info-file-supports-index-cookies (Info-file-supports-index-cookies filename)) ;; See whether file has a tag table. Record the location if yes. @@ -1251,17 +1253,17 @@ ;; Cache the contents of the (virtual) dir file, once we have merged ;; it for the first time, so we can save time subsequently. -(defvar Info-dir-contents nil) +(defvar-local Info-dir-contents nil) ;; Cache for the directory we decided to use for the default-directory ;; of the merged dir text. -(defvar Info-dir-contents-directory nil) +(defvar-local Info-dir-contents-directory nil) ;; Record the file attributes of all the files from which we ;; constructed Info-dir-contents. -(defvar Info-dir-file-attributes nil) +(defvar-local Info-dir-file-attributes nil) -(defvar Info-dir-file-name nil) +(defvar-local Info-dir-file-name nil) ;; Construct the Info directory node by merging the files named `dir' ;; from various directories. Set the *info* buffer's @@ -1334,13 +1336,12 @@ ;; knows... (let ((inhibit-null-byte-detection t)) (insert-file-contents file) - (set (make-local-variable 'Info-dir-file-name) - file) + (setq Info-dir-file-name file) (push (current-buffer) buffers) (push (cons file attrs) dir-file-attrs)) (error (kill-buffer (current-buffer)))))))) (unless (cdr dirs) - (set (make-local-variable 'Info-dir-contents-directory) + (setq Info-dir-contents-directory (file-name-as-directory (car dirs)))) (setq dirs (cdr dirs)))) @@ -1425,8 +1426,8 @@ (if problems (message "Composing main Info directory...problems encountered, see `*Messages*'") (message "Composing main Info directory...done")) - (set (make-local-variable 'Info-dir-contents) (buffer-string)) - (set (make-local-variable 'Info-dir-file-attributes) dir-file-attrs))) + (setq Info-dir-contents (buffer-string)) + (setq Info-dir-file-attributes dir-file-attrs))) (setq default-directory Info-dir-contents-directory)) (defvar Info-streamline-headings @@ -1892,7 +1893,7 @@ (cons (list (match-string-no-properties 1)) compl)))))))) (setq compl (cons '("*") (nreverse compl))) - (set (make-local-variable 'Info-current-file-completions) compl) + (setq Info-current-file-completions compl) compl)) @@ -2207,7 +2208,7 @@ "[" (or allowedchars "^,\t\n") " ]" ;The last char can't be a space. "\\|\\)\\)")) ;Allow empty node names. -;;; For compatibility; other files have used this name. +;; For compatibility; other files have used this name. (defun Info-following-node-name () (and (looking-at (Info-following-node-name-re)) (match-string-no-properties 1))) @@ -2645,7 +2646,7 @@ (defvar Info-complete-menu-buffer) (defvar Info-complete-next-re nil) (defvar Info-complete-nodes nil) -(defvar Info-complete-cache nil) +(defvar-local Info-complete-cache nil) (defconst Info-node-spec-re (concat (Info-following-node-name-re "^.,:") "[,:.]") @@ -2714,7 +2715,7 @@ (unless (equal Info-current-node orignode) (Info-goto-node orignode)) ;; Update the cache. - (set (make-local-variable 'Info-complete-cache) + (setq Info-complete-cache (list Info-current-file Info-current-node Info-complete-next-re string completions Info-complete-nodes))) @@ -3562,9 +3563,9 @@ (goto-char (point-min)) (re-search-forward "\\* Menu: *\n" nil t) (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t) - ;; add-to-list makes sure we don't have duplicates in `manuals', + ;; Make sure we don't have duplicates in `manuals', ;; so that the following dolist loop runs faster. - (add-to-list 'manuals (match-string 1))) + (cl-pushnew (match-string 1) manuals :test #'equal)) (dolist (manual (nreverse manuals)) (message "Searching %s" manual) (condition-case err @@ -4278,39 +4279,26 @@ (add-hook 'activate-menubar-hook 'Info-menu-update nil t) (setq case-fold-search t) (setq buffer-read-only t) - (make-local-variable 'Info-current-file) - (make-local-variable 'Info-current-subfile) - (make-local-variable 'Info-current-node) - (set (make-local-variable 'Info-tag-table-marker) (make-marker)) - (set (make-local-variable 'Info-tag-table-buffer) nil) - (make-local-variable 'Info-history) - (make-local-variable 'Info-history-forward) - (make-local-variable 'Info-index-alternatives) + (setq Info-tag-table-marker (make-marker)) (if Info-use-header-line ; do not override global header lines (setq header-line-format '(:eval (get-text-property (point-min) 'header-line)))) - (set (make-local-variable 'tool-bar-map) info-tool-bar-map) + (setq-local tool-bar-map info-tool-bar-map) ;; This is for the sake of the invisible text we use handling titles. - (set (make-local-variable 'line-move-ignore-invisible) t) - (set (make-local-variable 'desktop-save-buffer) - 'Info-desktop-buffer-misc-data) - (set (make-local-variable 'widen-automatically) nil) + (setq-local line-move-ignore-invisible t) + (setq-local desktop-save-buffer 'Info-desktop-buffer-misc-data) + (setq-local widen-automatically nil) (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t) (add-hook 'clone-buffer-hook 'Info-clone-buffer nil t) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) (add-hook 'isearch-mode-hook 'Info-isearch-start nil t) - (set (make-local-variable 'isearch-search-fun-function) - 'Info-isearch-search) - (set (make-local-variable 'isearch-wrap-function) - 'Info-isearch-wrap) - (set (make-local-variable 'isearch-push-state-function) - 'Info-isearch-push-state) - (set (make-local-variable 'isearch-filter-predicate) #'Info-isearch-filter) - (set (make-local-variable 'revert-buffer-function) - 'Info-revert-buffer-function) + (setq-local isearch-search-fun-function #'Info-isearch-search) + (setq-local isearch-wrap-function #'Info-isearch-wrap) + (setq-local isearch-push-state-function #'Info-isearch-push-state) + (setq-local isearch-filter-predicate #'Info-isearch-filter) + (setq-local revert-buffer-function #'Info-revert-buffer-function) (Info-set-mode-line) - (set (make-local-variable 'bookmark-make-record-function) - 'Info-bookmark-make-record)) + (setq-local bookmark-make-record-function #'Info-bookmark-make-record)) ;; When an Info buffer is killed, make sure the associated tags buffer ;; is killed too. @@ -4339,7 +4327,7 @@ map) "Local keymap used within `e' command of Info.") -(make-obsolete-variable 'Info-edit-map +(make-obsolete-variable 'Info-edit-mode-map "editing Info nodes by hand is not recommended." "24.4") @@ -4349,8 +4337,7 @@ (define-derived-mode Info-edit-mode text-mode "Info Edit" "Major mode for editing the contents of an Info node. Like text mode with the addition of `Info-cease-edit' -which returns to Info mode for browsing. -\\{Info-edit-map}" +which returns to Info mode for browsing." (setq buffer-read-only nil) (force-mode-line-update) (buffer-enable-undo (current-buffer))) @@ -4363,7 +4350,7 @@ (interactive) (Info-edit-mode) (message "%s" (substitute-command-keys - "Editing: Type \\\\[Info-cease-edit] to return to info"))) + "Editing: Type \\\\[Info-cease-edit] to return to info"))) (put 'Info-edit 'disabled "Editing Info nodes by hand is not recommended. This feature will be removed in future.") ------------------------------------------------------------ revno: 117018 committer: Stefan Monnier branch nick: trunk timestamp: Wed 2014-04-23 23:59:19 -0400 message: * src/window.c (Fset_window_configuration): Deactivate the mark before unsetting the mark. (set_window_buffer): Ignore window_initialized. (window_initialized): Remove. * src/keyboard.c (Qdeactivate_mark): Not static any more. * src/buffer.c (buffer_local_value): Rename from buffer_local_value_1. Update all callers. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-04-23 18:23:28 +0000 +++ src/ChangeLog 2014-04-24 03:59:19 +0000 @@ -1,3 +1,13 @@ +2014-04-24 Stefan Monnier + + * window.c (Fset_window_configuration): Deactivate the mark before + unsetting the mark. + (set_window_buffer): Ignore window_initialized. + (window_initialized): Remove. + * keyboard.c (Qdeactivate_mark): Not static any more. + * buffer.c (buffer_local_value): Rename from buffer_local_value_1. + Update all callers. + 2014-04-23 Paul Eggert * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0 === modified file 'src/buffer.c' --- src/buffer.c 2014-04-16 19:43:46 +0000 +++ src/buffer.c 2014-04-24 03:59:19 +0000 @@ -1158,10 +1158,10 @@ Sbuffer_local_value, 2, 2, 0, doc: /* Return the value of VARIABLE in BUFFER. If VARIABLE does not have a buffer-local binding in BUFFER, the value -is the default binding of the variable. */) +is the default binding of the variable. */) (register Lisp_Object variable, register Lisp_Object buffer) { - register Lisp_Object result = buffer_local_value_1 (variable, buffer); + register Lisp_Object result = buffer_local_value (variable, buffer); if (EQ (result, Qunbound)) xsignal1 (Qvoid_variable, variable); @@ -1174,7 +1174,7 @@ locally unbound. */ Lisp_Object -buffer_local_value_1 (Lisp_Object variable, Lisp_Object buffer) +buffer_local_value (Lisp_Object variable, Lisp_Object buffer) { register struct buffer *buf; register Lisp_Object result; === modified file 'src/buffer.h' --- src/buffer.h 2014-04-04 16:59:50 +0000 +++ src/buffer.h 2014-04-24 03:59:19 +0000 @@ -1079,7 +1079,7 @@ extern void validate_region (Lisp_Object *, Lisp_Object *); extern void set_buffer_internal_1 (struct buffer *); extern void set_buffer_temp (struct buffer *); -extern Lisp_Object buffer_local_value_1 (Lisp_Object, Lisp_Object); +extern Lisp_Object buffer_local_value (Lisp_Object, Lisp_Object); extern void record_buffer (Lisp_Object); extern void fix_overlays_before (struct buffer *, ptrdiff_t, ptrdiff_t); extern void mmap_set_vars (bool); === modified file 'src/keyboard.c' --- src/keyboard.c 2014-04-22 21:32:51 +0000 +++ src/keyboard.c 2014-04-24 03:59:19 +0000 @@ -228,14 +228,14 @@ Lisp_Object Qundefined; static Lisp_Object Qtimer_event_handler; -/* read_key_sequence stores here the command definition of the +/* `read_key_sequence' stores here the command definition of the key sequence that it reads. */ static Lisp_Object read_key_sequence_cmd; static Lisp_Object read_key_sequence_remapped; static Lisp_Object Qinput_method_function; -static Lisp_Object Qdeactivate_mark; +Lisp_Object Qdeactivate_mark; Lisp_Object Qrecompute_lucid_menubar, Qactivate_menubar_hook; === modified file 'src/window.c' --- src/window.c 2014-04-16 14:00:39 +0000 +++ src/window.c 2014-04-24 03:59:19 +0000 @@ -119,9 +119,6 @@ /* Incremented for each window created. */ static int sequence_number; -/* Nonzero after init_window_once has finished. */ -static int window_initialized; - /* Hook to run when window config changes. */ static Lisp_Object Qwindow_configuration_change_hook; @@ -3439,14 +3436,10 @@ wset_redisplay (w); w->update_mode_line = true; - /* We must select BUFFER for running the window-scroll-functions. */ - /* We can't check ! NILP (Vwindow_scroll_functions) here - because that might itself be a local variable. */ - if (window_initialized) - { - record_unwind_current_buffer (); - Fset_buffer (buffer); - } + /* We must select BUFFER to run the window-scroll-functions and to look up + the buffer-local value of Vwindow_point_insertion_type. */ + record_unwind_current_buffer (); + Fset_buffer (buffer); XMARKER (w->pointm)->insertion_type = !NILP (Vwindow_point_insertion_type); @@ -6267,6 +6260,15 @@ set_marker_restricted (w->start, p->start, w->contents); set_marker_restricted (w->pointm, p->pointm, w->contents); + if (MARKERP (p->mark) && !XMARKER (p->mark)->buffer + && !NILP (BVAR (XBUFFER (w->contents), mark_active))) + { + struct buffer *old = current_buffer; + extern Lisp_Object Qdeactivate_mark; + set_buffer_internal (XBUFFER (w->contents)); + call0 (Qdeactivate_mark); + set_buffer_internal (old); + } Fset_marker (BVAR (XBUFFER (w->contents), mark), p->mark, w->contents); @@ -6619,7 +6621,7 @@ else p->pointm = Fcopy_marker (w->pointm, Qnil); XMARKER (p->pointm)->insertion_type - = !NILP (buffer_local_value_1 /* Don't signal error if void. */ + = !NILP (buffer_local_value /* Don't signal error if void. */ (Qwindow_point_insertion_type, w->contents)); p->start = Fcopy_marker (w->start, Qnil); @@ -7138,8 +7140,6 @@ Vterminal_frame = selected_frame; minibuf_window = f->minibuffer_window; selected_window = f->selected_window; - - window_initialized = 1; } void === modified file 'src/xdisp.c' --- src/xdisp.c 2014-04-18 23:36:51 +0000 +++ src/xdisp.c 2014-04-24 03:59:19 +0000 @@ -23422,7 +23422,7 @@ return OK_PIXELS (WINDOW_SCROLL_BAR_AREA_WIDTH (it->w)); } - prop = buffer_local_value_1 (prop, it->w->contents); + prop = buffer_local_value (prop, it->w->contents); if (EQ (prop, Qunbound)) prop = Qnil; } @@ -23474,7 +23474,7 @@ return OK_PIXELS (pixels); } - car = buffer_local_value_1 (car, it->w->contents); + car = buffer_local_value (car, it->w->contents); if (EQ (car, Qunbound)) car = Qnil; } @@ -28543,8 +28543,8 @@ else if (area == ON_MODE_LINE) { Lisp_Object default_help - = buffer_local_value_1 (Qmode_line_default_help_echo, - w->contents); + = buffer_local_value (Qmode_line_default_help_echo, + w->contents); if (STRINGP (default_help)) {