From: Stefan Monnier Date: Fri, 5 Dec 2014 20:20:02 +0000 (-0500) Subject: Merge from emacs-24 X-Git-Tag: emacs-25.0.90~2635^2~189 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fca389d1d3253c58e198efaa28d175106ce5022a;p=emacs.git Merge from emacs-24 --- fca389d1d3253c58e198efaa28d175106ce5022a diff --cc admin/gitmerge.el index d2f906806c8,00000000000..206f12c08ad mode 100644,000000..100644 --- a/admin/gitmerge.el +++ b/admin/gitmerge.el @@@ -1,528 -1,0 +1,525 @@@ +;;; gitmerge.el --- help merge one Emacs branch into another + +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. + +;; Authors: David Engster +;; Stefan Monnier + +;; Keywords: maint + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Rewrite of bzrmerge.el, but using git. +;; +;; In a nutshell: For merging foo into master, do +;; +;; - 'git checkout master' in Emacs repository +;; - Start Emacs, cd to Emacs repository +;; - M-x gitmerge +;; - Choose branch 'foo' or 'origin/foo', depending on whether you +;; like to merge from a local tracking branch or from the remote +;; (does not make a difference if the local tracking branch is +;; up-to-date). +;; - Mark commits you'd like to skip, meaning to only merge their +;; metadata (merge strategy 'ours'). +;; - Hit 'm' to start merging. Skipped commits will be merged separately. +;; - If conflicts cannot be resolved automatically, you'll have to do +;; it manually. In that case, resolve the conflicts and restart +;; gitmerge, which will automatically resume. It will add resolved +;; files, commit the pending merge and continue merging the rest. +;; - Inspect master branch, and if everything looks OK, push. + +;;; Code: + +(require 'vc-git) +(require 'smerge-mode) + +(defvar gitmerge-skip-regexp + "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk\\|\ +Auto-commit" + "Regexp matching logs of revisions that might be skipped. +`gitmerge-missing' will ask you if it should skip any matches.") + +(defvar gitmerge-status-file (expand-file-name "gitmerge-status" + user-emacs-directory) + "File where missing commits will be saved between sessions.") + +(defvar gitmerge-ignore-branches-regexp + "origin/\\(\\(HEAD\\|master\\)$\\|\\(old-branches\\|other-branches\\)/\\)" + "Regexp matching branches we want to ignore.") + +(defface gitmerge-skip-face + '((t (:strike-through t))) + "Face for skipped commits.") + +(defconst gitmerge-default-branch "origin/emacs-24" + "Default for branch that should be merged.") + +(defconst gitmerge-buffer "*gitmerge*" + "Working buffer for gitmerge.") + +(defconst gitmerge-output-buffer "*gitmerge output*" + "Buffer for displaying git output.") + +(defconst gitmerge-warning-buffer "*gitmerge warnings*" + "Buffer where gitmerge will display any warnings.") + +(defvar gitmerge-log-regexp + "^\\([A-Z ]\\)\\s-*\\([0-9a-f]+\\) \\(.+?\\): \\(.*\\)$") + +(defvar gitmerge-mode-map + (let ((map (make-keymap))) + (define-key map [(l)] 'gitmerge-show-log) + (define-key map [(d)] 'gitmerge-show-diff) + (define-key map [(f)] 'gitmerge-show-files) + (define-key map [(s)] 'gitmerge-toggle-skip) + (define-key map [(m)] 'gitmerge-start-merge) + map) + "Keymap for gitmerge major mode.") + ++ ++(defvar gitmerge-mode-font-lock-keywords ++ `((,gitmerge-log-regexp ++ (1 font-lock-warning-face) ++ (2 font-lock-constant-face) ++ (3 font-lock-builtin-face) ++ (4 font-lock-comment-face)))) ++ +(defvar gitmerge--commits nil) +(defvar gitmerge--from nil) + +(defun gitmerge-get-sha1 () + "Get SHA1 from commit at point." + (save-excursion + (goto-char (point-at-bol)) + (when (looking-at "^[A-Z ]\\s-*\\([a-f0-9]+\\)") + (match-string 1)))) + +(defun gitmerge-show-log () + "Show log of commit at point." + (interactive) + (save-selected-window + (let ((commit (gitmerge-get-sha1))) + (when commit + (pop-to-buffer (get-buffer-create gitmerge-output-buffer)) + (fundamental-mode) + (erase-buffer) + (call-process "git" nil t nil "log" "-1" commit) + (goto-char (point-min)) + (gitmerge-highlight-skip-regexp))))) + +(defun gitmerge-show-diff () + "Show diff of commit at point." + (interactive) + (save-selected-window + (let ((commit (gitmerge-get-sha1))) + (when commit + (pop-to-buffer (get-buffer-create gitmerge-output-buffer)) + (erase-buffer) + (call-process "git" nil t nil "diff-tree" "-p" commit) + (goto-char (point-min)) + (diff-mode))))) + +(defun gitmerge-show-files () + "Show changed files of commit at point." + (interactive) + (save-selected-window + (let ((commit (gitmerge-get-sha1))) + (when commit + (pop-to-buffer (get-buffer-create gitmerge-output-buffer)) + (erase-buffer) + (fundamental-mode) + (call-process "git" nil t nil "diff" "--name-only" (concat commit "^!")) + (goto-char (point-min)))))) + +(defun gitmerge-toggle-skip () + "Toggle skipping of commit at point." + (interactive) + (let ((commit (gitmerge-get-sha1)) + skip) + (when commit + (save-excursion + (goto-char (point-at-bol)) + (when (looking-at "^\\([A-Z ]\\)\\s-*\\([a-f0-9]+\\)") + (setq skip (string= (match-string 1) " ")) + (goto-char (match-beginning 2)) + (gitmerge-handle-skip-overlay skip) + (dolist (ct gitmerge--commits) + (when (string-match commit (car ct)) + (setcdr ct (when skip "M")))) + (goto-char (point-at-bol)) + (setq buffer-read-only nil) + (delete-char 1) + (insert (if skip "M" " ")) + (setq buffer-read-only t)))))) + +(defun gitmerge-highlight-skip-regexp () + "Highlight strings that match `gitmerge-skip-regexp'." + (save-excursion + (while (re-search-forward gitmerge-skip-regexp nil t) + (put-text-property (match-beginning 0) (match-end 0) + 'face 'font-lock-warning-face)))) + +(defun gitmerge-missing (from) + "Return the list of revisions that need to be merged from FROM. +Will detect a default set of skipped revision by looking at +cherry mark and search for `gitmerge-skip-regexp'. The result is +a list with entries of the form (SHA1 . SKIP), where SKIP denotes +if and why this commit should be skipped." + (let (commits) + ;; Go through the log and remember all commits that match + ;; `gitmerge-skip-regexp' or are marked by --cherry-mark. + (with-temp-buffer + (call-process "git" nil t nil "log" "--cherry-mark" from + (concat "^" (car (vc-git-branches)))) + (goto-char (point-max)) + (while (re-search-backward "^commit \\(.+\\) \\([0-9a-f]+\\).*" nil t) + (let ((cherrymark (match-string 1)) + (commit (match-string 2))) + (push (list commit) commits) + (if (string= cherrymark "=") + ;; Commit was recognized as backported by cherry-mark. + (setcdr (car commits) "C") + (save-excursion + (let ((case-fold-search t)) + (while (not (looking-at "^\\s-+[^ ]+")) + (forward-line)) + (when (re-search-forward gitmerge-skip-regexp nil t) + (setcdr (car commits) "R")))))) + (delete-region (point) (point-max)))) + (nreverse commits))) + +(defun gitmerge-setup-log-buffer (commits from) + "Create the buffer for choosing commits." + (with-current-buffer (get-buffer-create gitmerge-buffer) + (erase-buffer) + (call-process "git" nil t nil "log" + "--pretty=format:%h %<(20,trunc) %an: %<(100,trunc) %s" + from (concat "^" (car (vc-git-branches)))) + (goto-char (point-min)) + (while (looking-at "^\\([a-f0-9]+\\)") + (let ((skipreason (gitmerge-skip-commit-p (match-string 1) commits))) + (if (null skipreason) + (insert " ") + (insert skipreason " ") + (gitmerge-handle-skip-overlay t))) + (forward-line)) + (current-buffer))) + +(defun gitmerge-handle-skip-overlay (skip) + "Create or delete overlay on SHA1, depending on SKIP." + (when (looking-at "[0-9a-f]+") + (if skip + (let ((ov (make-overlay (point) + (match-end 0)))) + (overlay-put ov 'face 'gitmerge-skip-face)) + (remove-overlays (point) (match-end 0) + 'face 'gitmerge-skip-face)))) + +(defun gitmerge-skip-commit-p (commit skips) + "Tell whether COMMIT should be skipped. +COMMIT is an (possibly abbreviated) SHA1. SKIPS is list of +cons'es with commits that should be skipped and the reason. +Return value is string which denotes reason, or nil if commit +should not be skipped." + (let (found skip) + (while (and (setq skip (pop skips)) + (not found)) + (when (string-match commit (car skip)) + (setq found (cdr skip)))) + found)) + +(defun gitmerge-resolve (file) + "Try to resolve conflicts in FILE with smerge. +Returns non-nil if conflicts remain." + (unless (file-exists-p file) (error "Gitmerge-resolve: Can't find %s" file)) + (with-demoted-errors + (let ((exists (find-buffer-visiting file))) + (with-current-buffer (let ((enable-local-variables :safe) + (enable-local-eval nil)) + (find-file-noselect file)) + (if (buffer-modified-p) + (user-error "Unsaved changes in %s" (current-buffer))) + (save-excursion + (cond + ((derived-mode-p 'change-log-mode) + ;; Fix up dates before resolving the conflicts. + (goto-char (point-min)) + (let ((diff-auto-refine-mode nil)) + (while (re-search-forward smerge-begin-re nil t) + (smerge-match-conflict) + (smerge-ensure-match 3) + (let ((start1 (match-beginning 1)) + (end1 (match-end 1)) + (start3 (match-beginning 3)) + (end3 (copy-marker (match-end 3) t))) + (goto-char start3) + (while (re-search-forward change-log-start-entry-re end3 t) + (let* ((str (match-string 0)) + (newstr (save-match-data + (concat (add-log-iso8601-time-string) + (when (string-match " *\\'" str) + (match-string 0 str)))))) + (replace-match newstr t t))) + ;; change-log-resolve-conflict prefers to put match-1's + ;; elements first (for equal dates), whereas we want to put + ;; match-3's first. + (let ((match3 (buffer-substring start3 end3)) + (match1 (buffer-substring start1 end1))) + (delete-region start3 end3) + (goto-char start3) + (insert match1) + (delete-region start1 end1) + (goto-char start1) + (insert match3))))) + ;; (pop-to-buffer (current-buffer)) (debug 'before-resolve) + )) + ;; Try to resolve the conflicts. + (cond + ((member file '("configure" "lisp/ldefs-boot.el" + "lisp/emacs-lisp/cl-loaddefs.el")) + ;; We are in the file's buffer, so names are relative. + (call-process "git" nil t nil "checkout" "--" + (file-name-nondirectory file)) + (revert-buffer nil 'noconfirm)) + (t + (goto-char (point-max)) + (while (re-search-backward smerge-begin-re nil t) + (save-excursion + (ignore-errors + (smerge-match-conflict) + (smerge-resolve)))) + ;; (when (derived-mode-p 'change-log-mode) + ;; (pop-to-buffer (current-buffer)) (debug 'after-resolve)) + (save-buffer))) + (goto-char (point-min)) + (prog1 (re-search-forward smerge-begin-re nil t) + (unless exists (kill-buffer)))))))) + +(defun gitmerge-commit-message (beg end skip branch) + "Create commit message for merging BEG to END from BRANCH. +SKIP denotes whether those commits are actually skipped. If END +is nil, only the single commit BEG is merged." + (with-temp-buffer + (insert "Merge from " branch "\n\n" + (if skip + (concat "The following commit" + (if end "s were " " was ") + "skipped:\n\n") + "")) + (apply 'call-process "git" nil t nil "log" "--oneline" + (if end (list (concat beg "~.." end)) + `("-1" ,beg))) + (insert "\n") + (buffer-string))) + +(defun gitmerge-apply (missing from) + "Merge commits in MISSING from branch FROM. +MISSING must be a list of SHA1 strings." + (with-current-buffer (get-buffer-create gitmerge-output-buffer) + (erase-buffer) + (let* ((skip (cdar missing)) + (beg (car (pop missing))) + end commitmessage) + ;; Determine last revision with same boolean skip status. + (while (and missing + (eq (null (cdar missing)) + (null skip))) + (setq end (car (pop missing)))) + (setq commitmessage + (gitmerge-commit-message beg end skip from)) + (message "%s %s%s" + (if skip "Skipping" "Merging") + (substring beg 0 6) + (if end (concat ".." (substring end 0 6)) "")) + (unless end + (setq end beg)) + (unless (zerop + (apply 'call-process "git" nil t nil "merge" "--no-ff" + (append (when skip '("-s" "ours")) + `("-m" ,commitmessage ,end)))) + (gitmerge-write-missing missing from) + (gitmerge-resolve-unmerged))) + missing)) + +(defun gitmerge-resolve-unmerged () + "Resolve all files that are unmerged. +Throw an user-error if we cannot resolve automatically." + (with-current-buffer (get-buffer-create gitmerge-output-buffer) + (erase-buffer) + (let (files conflicted) + ;; List unmerged files + (if (not (zerop + (call-process "git" nil t nil + "diff" "--name-only" "--diff-filter=U"))) + (error "Error listing unmerged files. Resolve manually.") + (goto-char (point-min)) + (while (not (eobp)) + (push (buffer-substring (point) (line-end-position)) files) + (forward-line)) + (dolist (file files) + (if (gitmerge-resolve file) + ;; File still has conflicts + (setq conflicted t) + ;; Mark as resolved + (call-process "git" nil t nil "add" file))) + (when conflicted + (with-current-buffer (get-buffer-create gitmerge-warning-buffer) + (erase-buffer) + (insert "For the following files, conflicts could\n" + "not be resolved automatically:\n\n") + (call-process "git" nil t nil + "diff" "--name-only" "--diff-filter=U") + (insert "\nResolve the conflicts manually, then run gitmerge again." + "\nNote:\n - You don't have to add resolved files or " + "commit the merge yourself (but you can)." + "\n - You can safely close this Emacs session and do this " + "in a new one." + "\n - When running gitmerge again, remember that you must " + "that from within the Emacs repo.\n") + (pop-to-buffer (current-buffer))) + (user-error "Resolve the conflicts manually")))))) + +(defun gitmerge-repo-clean () + "Return non-nil if repository is clean." + (with-temp-buffer + (call-process "git" nil t nil + "diff" "--staged" "--name-only") + (call-process "git" nil t nil + "diff" "--name-only") + (zerop (buffer-size)))) + +(defun gitmerge-maybe-resume () + "Check if we have to resume a merge. +If so, add no longer conflicted files and commit." + (let ((mergehead (file-exists-p + (expand-file-name ".git/MERGE_HEAD" default-directory))) + (statusexist (file-exists-p gitmerge-status-file))) + (when (and mergehead (not statusexist)) + (user-error "Unfinished merge, but no record of a previous gitmerge run")) + (when (and (not mergehead) + (not (gitmerge-repo-clean))) + (user-error "Repository is not clean")) + (when statusexist + (if (not (y-or-n-p "Resume merge? ")) + (progn + (delete-file gitmerge-status-file) + ;; No resume. + nil) + (message "OK, resuming...") + (gitmerge-resolve-unmerged) + ;; Commit the merge. + (when mergehead + (with-current-buffer (get-buffer-create gitmerge-output-buffer) + (erase-buffer) + (unless (zerop (call-process "git" nil t nil + "commit" "--no-edit")) + (error "Git error during merge - fix it manually")))) + ;; Successfully resumed. + t)))) + +(defun gitmerge-get-all-branches () + "Return list of all branches, including remotes." + (with-temp-buffer + (unless (zerop (call-process "git" nil t nil + "branch" "-a")) + (error "Git error listing remote branches")) + (goto-char (point-min)) + (let (branches branch) + (while (not (eobp)) + (when (looking-at "^[^\\*]\\s-*\\(?:remotes/\\)?\\(.+\\)$") + (setq branch (match-string 1)) + (unless (string-match gitmerge-ignore-branches-regexp branch) + (push branch branches))) + (forward-line)) + (nreverse branches)))) + +(defun gitmerge-write-missing (missing from) + "Write list of commits MISSING into `gitmerge-status-file'. +Branch FROM will be prepended to the list." + (with-current-buffer + (find-file-noselect gitmerge-status-file) + (erase-buffer) + (insert + (prin1-to-string (append (list from) missing)) + "\n") + (save-buffer) + (kill-buffer))) + +(defun gitmerge-read-missing () + "Read list of missing commits from `gitmerge-status-file'." + (with-current-buffer + (find-file-noselect gitmerge-status-file) + (unless (zerop (buffer-size)) + (prog1 (read (buffer-string)) + (kill-buffer))))) + - (defun gitmerge-mode () ++(define-derived-mode gitmerge-mode special-mode "gitmerge" + "Major mode for Emacs branch merging." - (interactive) - (kill-all-local-variables) - (setq major-mode 'gitmerge-mode) - (setq mode-name "gitmerge") + (set-syntax-table text-mode-syntax-table) - (use-local-map gitmerge-mode-map) - (make-local-variable 'font-lock-defaults) - (setq gitmerge-mode-font-lock-keywords - (list (list gitmerge-log-regexp - '(1 font-lock-warning-face) - '(2 font-lock-constant-face) - '(3 font-lock-builtin-face) - '(4 font-lock-comment-face)))) + (setq buffer-read-only t) - (setq font-lock-defaults '(gitmerge-mode-font-lock-keywords))) ++ (setq-local truncate-lines t) ++ (setq-local font-lock-defaults '(gitmerge-mode-font-lock-keywords))) + +(defun gitmerge (from) + "Merge from branch FROM into `default-directory'." + (interactive + (if (not (vc-git-root default-directory)) + (user-error "Not in a git tree") + (let ((default-directory (vc-git-root default-directory))) + (list + (if (gitmerge-maybe-resume) + 'resume + (completing-read "Merge branch: " (gitmerge-get-all-branches) + nil t gitmerge-default-branch)))))) + (let ((default-directory (vc-git-root default-directory))) + (if (eq from 'resume) + (progn + (setq gitmerge--commits (gitmerge-read-missing)) + (setq gitmerge--from (pop gitmerge--commits)) + ;; Directly continue with the merge. + (gitmerge-start-merge)) + (setq gitmerge--commits (gitmerge-missing from)) + (setq gitmerge--from from) + (when (null gitmerge--commits) + (user-error "Nothing to merge")) + (with-current-buffer + (gitmerge-setup-log-buffer gitmerge--commits gitmerge--from) + (goto-char (point-min)) + (insert (propertize "Commands: " 'font-lock-face 'bold) + "(s) Toggle skip, (l) Show log, (d) Show diff, " + "(f) Show files, (m) Start merge\n" + (propertize "Flags: " 'font-lock-face 'bold) + "(C) Detected backport (cherry-mark), (R) Log matches " + "regexp, (M) Manually picked\n\n") + (gitmerge-mode) + (pop-to-buffer (current-buffer)))))) + +(defun gitmerge-start-merge () + (interactive) + (when (not (vc-git-root default-directory)) + (user-error "Not in a git tree")) + (let ((default-directory (vc-git-root default-directory))) + (while gitmerge--commits + (setq gitmerge--commits + (gitmerge-apply gitmerge--commits gitmerge--from))) + (when (file-exists-p gitmerge-status-file) + (delete-file gitmerge-status-file)) + (message "Merging from %s...done" gitmerge--from))) + +(provide 'gitmerge) + +;;; gitmerge.el ends here diff --cc lisp/ChangeLog index 2c6c377dfce,ac36c059bd3..b4e51a6eebb --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@@ -1,304 -1,17 +1,318 @@@ -2014-12-01 Stefan Monnier ++2014-12-05 Stefan Monnier + + * progmodes/prog-mode.el (prettify-symbols--compose-symbol): + Fix handling of symbols with different syntax at beginning/end or with + symbol rather than word syntax. + -2014-11-30 Eli Zaretskii ++2014-12-05 Eli Zaretskii + + * simple.el (line-move): If noninteractive, call line-move-1, not + forward-line, since the former is compatible with line-move-visual + both in terms of the column to which it moves and the return + value. (Bug#19211) + -2014-11-27 Stephen Berman ++2014-12-05 Stephen Berman +2014-12-05 Stefan Monnier + + * vc/ediff-init.el (ediff-odd-p): Remove. + (ediff-background-face): Use cl-oddp instead. + (ediff-buffer-live-p): Make it a defsubst. + + * tooltip.el (tooltip-region-active-p): Remove. + + * net/shr.el (shr-char-breakable-p, shr-char-kinsoku-bol-p) + (shr-char-kinsoku-eol-p, shr-char-nospace-p): Use define-inline. + + * fringe.el (fringe-bitmap-p): Make it a plain function. + + * emacs-lisp/eieio-core.el: Prefer inlinable functions over macros. + (class-p, generic-p, eieio-object-p, class-abstract-p): + Make them defsubst, so as to avoid corner case problems where + the arg might be evaluated in the condition-case, or it can't be passed + to higher-order functions like `cl-some'. + +2014-12-05 Nicolas Richard + + * wid-edit.el (widget-choose): Let numeric keypad work (bug#19268) + and remove old menu-related code. + +2014-12-05 Lars Magne Ingebrigtsen + + * net/eww.el (eww-display-pdf): Let mailcap determine how to + display PDF files (bug#19270). + +2014-12-05 Juri Linkov + + Compare with the most recent window by default. + * vc/compare-w.el (compare-windows-get-window-function): New defcustom. + (compare-windows-get-recent-window) + (compare-windows-get-next-window): New functions. + (compare-windows, compare-windows-sync-default-function): + Use `compare-windows-get-window-function' instead of `next-window'. + (compare-windows): Add diff/match messages with region boundaries. + (Bug#19170) + +2014-12-04 Stefan Monnier + + * subr.el (filter): Remove. Use `cl-remove-if-not' or `seq-filter'. + +2014-12-04 Lars Magne Ingebrigtsen + + * net/shr.el (shr--extract-best-source): Ignore non-text children. + +2014-12-04 Eli Zaretskii + + Implement copying of a buffer portion while preserving visual order. + * simple.el (bidi-directional-controls-chars) + (bidi-directional-non-controls-chars): New variables. + (squeeze-bidi-context-1, squeeze-bidi-context) + (line-substring-with-bidi-context) + (buffer-substring-with-bidi-context): New functions. + + * files.el (file-tree-walk): Doc fix. + +2014-12-04 Rupert Swarbrick (tiny change) + Rüdiger Sonderfeld + + * autoinsert.el (auto-insert-alist): Update C/C++ header and + program support to match more extensions. Replace non-alnum + characters when generating include guards (headers) and check for + more extensions when generating includes (programs) + (bug#19254). + +2014-12-03 Eric S. Raymond + + * files.el (file-tree-walk): Fix docstring. + +2014-12-03 Karl Fogel + + Fix bug whereby saving files hung in VC hook. + + Saving a buffer visiting a file under SVN control would hang if + the remote repository were unreachable, because the VC hooks tried + to run "svn status -u" on the file, where the "-u" tells svn to + get update information from the remote repository. + http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00174.html + + * vc/vc-svn.el (vc-svn-state): Remove optional `localp' + argument and always pass "-v" to "svn status", never "-u". + +2014-12-03 Stefan Monnier + + * emacs-lisp/inline.el: Fix up copyright header. + (inline-quote, inline-const-p, inline-const-val, inline-error): + Silence compiler warnings. + (inline-letevals): Fix edebug spec. + (inline--testconst-p): Consider lambda expressions as const-p. + (inline--getconst-val): Use inline--testconst-p. + + * minibuffer.el (completion-table-dynamic): Add arg `switch-buffer' + and change default to stay in the minibuffer when called from + the minibuffer (bug#19250). + (lazy-completion-table): Use this new argument to preserve the + old behavior. + + * progmodes/elisp-mode.el (elisp--local-variables): Don't burp on + incorrect lexical elements (bug#19250). + +2014-12-03 Eric S. Raymond + + * files.el (file-tree-walk): Lisp translation of ANSI ftw(3). + +2014-12-02 Glenn Morris + + * whitespace.el (whitespace-big-indent-regexp): Add :version. + +2014-12-02 Eric S. Raymond + + * subr.el (filter): New macro. Because it's just silly for a Lisp + not to have this in 2014. And VC needs it. + + * vc.el, all backends: API simplification: Abolish dir-status. + It's replaced by dir-status-files. + + * vc.el, all backends: API simplification: Remove 4th + 'default-state' argument from vc-dir-status files and its backend + methods - no backend method ever set it. It was used only in the + fallback method to to set a default of 'up-to-date, though a + convoluted call chain obscured this. + + * vc-hooks.el: Bind vc-delete-file to Ctrl-x v delete. + + * vc.el (vc-expand-dirs): Now takes a second BACKEND argument, + improving behavior on directories using multiple file-oriented VCSes. + + * vc/vc.el and all backends: API simplification; clear-headers + is no longer a public method. It is now local to the one place + it's used, in the RCS steal-lock method. + +2014-12-01 Eric S. Raymond + + * vc/vc.el and all backends: API simplification; could-register + is no longer a public method. (vc-cvs.el still has a private + implementation.) + + * vc/vc.el and all backends: API cleanup; the backend diff method + takes an explicit async flag. This eliminates a particularly ugly + global. + + * vc-bzr.el: Restore vc-bzr-state-heuristic as a private method. + VC randomly/unpredictably fails without it; cause not yet established. + +2014-12-01 Stefan Monnier + + Merge some of the differences from the standalone CC-mode. + The main change is to only use the `category' text-property only when + available. For that many calls are changed to use c-get-char-property, + c-next-single-property-change, c-sc-scan-lists, + c-sc-parse-partial-sexp, c-unmark-<->-as-paren. + + * progmodes/cc-mode.el (c-just-done-before-change): New var. + (c-basic-common-init): Initialize it. + (c-common-init): Only use mode-require-final-newline when available. + (c-before-change): Check and set c-just-done-before-change. + (c-after-change): Re-set c-just-done-before-change. + (c-advise-fl-for-region): New macro. + (lazy-lock-defer-rest-after-change, lazy-lock-defer-line-after-change) + (font-lock-after-change-function, jit-lock-after-change): + Advise if needed. + + * progmodes/cc-langs.el (c-modified-constant): New lang var. + (c-known-type-key): Don't make a list just to throw it away. + + * progmodes/cc-engine.el (c-invalidate-state-cache, c-parse-state): + Handle the case where categories are not available. + (c-record-parse-state-state, c-replay-parse-state-state): + Handle marker values. + (c-before-change-check-<>-operators): Look for the `syntax-table' + property rather than for the corresponding `category'. + (c-looking-at-decl-block): Remove unused var + `c-disallow-comma-in-<>-arglists'. + (c-forward-<>-arglist-recur): Remove unused var + `orig-record-found-types'. + + * progmodes/cc-defs.el (c-version): Bump up to 5.33. + (c-use-category): New const. + (c-next-single-property-change): New macro. + (c-region-is-active-p): Prefer region-active-p when available. + (c-search-backward-char-property): Fix old min/max typo; probably + a copy/paste error. + (c-mark-<-as-paren, c-mark->-as-paren, c-unmark-<->-as-paren): + Turn them into macros that obey c-use-category. + (c-sc-scan-lists-no-category+1+1, c-sc-scan-lists-no-category+1-1) + (c-sc-scan-lists-no-category-1+1, c-sc-scan-lists-no-category-1-1) + (c-sc-scan-lists, c-sc-parse-partial-sexp) + (c-looking-at-non-alphnumspace): New macros. + (c-sc-parse-partial-sexp-no-category): New function. + (c-emacs-features): Add `category-properties' element. + + * progmodes/cc-cmds.el (c-forward-into-nomenclature) + (c-backward-into-nomenclature): Use cc-subword if subword-mode is + not available. + (c-beginning-of-defun, c-end-of-defun, c-mark-function) + (c-indent-line-or-region): Use c-region-is-active-p. + + * progmodes/cc-bytecomp.el (cc-bytecomp-unbound-variables) + (cc-bytecomp-original-functions, cc-bytecomp-original-properties) + (cc-bytecomp-loaded-files): Re-set each time the file is loaded. + (cc-bytecomp-obsolete-var, cc-bytecomp-ignore-obsolete) + (cc-bytecomp-obsolete-fun): Delete unused functions. + + * progmodes/cc-align.el (c-lineup-respect-col-0): New function. + +2014-12-01 Lars Magne Ingebrigtsen + + * net/shr.el (shr-dom-print): Fix up `shr-dom-print' after the + dom.el changes. + +2014-12-01 Stefan Monnier + + * vc/vc.el (vc-find-conflicted-file): Look for conflicted files in the + current "project" rather than just the current directory. + * vc/vc-git.el (vc-git-conflicted-files): Clarify in which directory + the file names make sense. + + * vc/smerge-mode.el (smerge-swap): New command. + + * vc/diff-mode.el (diff-kill-applied-hunks): New command. + +2014-12-01 Ulf Jasper + + * net/newst-treeview.el (newsticker--treeview-item-show): + Check window liveliness before measuring its width. + + * net/newst-backend.el (newsticker--get-news-by-url-callback): + Pass correct status to `newsticker--sentinel-work'. + (newsticker--sentinel-work): Use "newsticker--download-error" as + guid in order to prevent multiple "Could not download..." + messages. Fixes bug#19166. + +2014-12-01 Ivan Shmakov + + * net/eww.el (eww-render): Call `eww-after-render-hook' in the + correct buffer (bug#19225). + +2014-12-01 Lars Magne Ingebrigtsen + + * net/nsm.el (network-security-level): Change the default to `medium'. + + * net/eww.el (eww): Leave point in a place that doesn't cause + scrolling when displaying "Loading...". + +2014-12-01 Eric S. Raymond + + * vc/vc.el, vc/vc-cvs.el, vc/vc-rcs.el, vc/vc-svn.el: The 'merge' + backend method of RCS/CVS/SVN is now 'merge-file', to contrast with + 'merge-branch'. Prompting for merge revisions is pushed down to + the back ends; this fixes a layering violation that caused bad + behavior with SVN. + + * vc/vc.el, vc-hooks.el, and all backends: API simplification; + vc-stay-local-p and repository-hostname are no longer public + methods. Only the CVS and SVN backends used these, and the SVN + support was conditioned out because svn status -v is too slow. + The CVS back end retains this machibery and the vc-stay-local + configuration variable now only affects it. + +2014-12-01 Stefan Monnier + + * emacs-lisp/inline.el: New file. + +2014-12-01 Eric S. Raymond + + * vc/vc.el, vc-hooks.el, and all backends: API simplification; + vc-state-heuristic is no longer a public method, having been + removed where it is redundant, unnecessary, or known buggy. + This eliminated all backends except CVS. Eliminates bug#7850. + + * vc/vc-cvs.el, vc/vc-hooks.el, vc/vc-rcs.el, vc/vc-sccs.el: + Eliminate vc-mistrust-permissions. It was only relevant to the + RCS and SCCS back ends and defaulted to t. Code now always + mistrusts permissions - by actual measurement the effect on + performance is negligible. As a side effect bug#11490 is now + irrelevant. + + * vc/vc.el, vc-hooks.el, and all backends: API simplification; + vc-workfile-unchanged-p is no longer a public method (but the RCS + and SCCS back ends retain it as a private method used in state + computation). This method was redundant with vc-state and usually + implemented as a trivial call to same. Fixes the failure mode + described in bug#694. + + * vc/vc.el and all backends: API simplification; init-revision is + gone, and vc-registered functions no longer take an + initial-revision argument. + +2014-11-29 Glenn Morris + + * vc/vc-src.el (vc-src, vc-src-diff-switches) + (vc-src-master-templates): Fix :version tags. + +2014-11-29 Paul Rankin (tiny change) + + * outline.el (outline-move-subtree-down): Refactor and improve code. + +2014-11-29 Stephen Berman Stefan Monnier * outline.el (outline-move-subtree-down): Make sure we can move