diff options
| author | Glenn Morris | 2018-07-02 19:19:26 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-07-02 19:19:26 -0700 |
| commit | 02f2f336af7c4129ec79ab00881bba3e14ff9820 (patch) | |
| tree | 3f279977bb231ea6ddab8680999bc1bffcb31071 /lisp | |
| parent | bc0e36df8d33595d6411ec4c18e3f4b643c01306 (diff) | |
| parent | fc5cae731cede7e00f3f2d40d6577537f872d439 (diff) | |
| download | emacs-02f2f336af7c4129ec79ab00881bba3e14ff9820.tar.gz emacs-02f2f336af7c4129ec79ab00881bba3e14ff9820.zip | |
Merge from origin/emacs-26
fc5cae7 ; Fix ChangeLog typo.
e17a5e5 ; make change-history-commit
f205928 * etc/HISTORY: Cite Brinkoff on early history.
4e58ca8 Document internal use of 'above-suspended' z-group frame para...
4bd43b0 Increase max-lisp-eval-depth adjustment while in debugger (bu...
ab98352 Improve on last change in replace-buffer-contents
2f149c0 Fix a factual error in Introduction to Emacs Lisp
8ad50a3 ; * lisp/files.el (buffer-offer-save): Doc fix. (Bug#32000)
c80f31f Minor improvements in documentation of imenu.el
8ebb683 Avoid errors with recentering in 'skeleton-insert'
e980a3c * src/lisp.h: Omit obsolete comment re bytecode stack.
eec71eb Speed up replace-buffer-contents
93c41ce Remove extra process call from vc-git-find-file-hook
7ea0873 ; Update some commentary
4a7f423 Speed up vc-git-dir-status-files
9134c84 Avoid compiler warning using coding.h
Conflicts:
src/editfns.c
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/debug.el | 1 | ||||
| -rw-r--r-- | lisp/files.el | 8 | ||||
| -rw-r--r-- | lisp/imenu.el | 6 | ||||
| -rw-r--r-- | lisp/skeleton.el | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 16 |
5 files changed, 16 insertions, 18 deletions
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index e8a3015b8fb..0efaa637129 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el | |||
| @@ -349,6 +349,7 @@ That buffer should be current already." | |||
| 349 | (backtrace-frames 'debug))) | 349 | (backtrace-frames 'debug))) |
| 350 | (print-escape-newlines t) | 350 | (print-escape-newlines t) |
| 351 | (print-escape-control-characters t) | 351 | (print-escape-control-characters t) |
| 352 | ;; If you increase print-level, add more depth in call_debugger. | ||
| 352 | (print-level 8) | 353 | (print-level 8) |
| 353 | (print-length 50) | 354 | (print-length 50) |
| 354 | (pos (point))) | 355 | (pos (point))) |
diff --git a/lisp/files.el b/lisp/files.el index 31e2f39a8d1..eabb3c0e06c 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -148,12 +148,16 @@ This variable is relevant only if `backup-by-copying' and | |||
| 148 | Called with an absolute file name as argument, it returns t to enable backup.") | 148 | Called with an absolute file name as argument, it returns t to enable backup.") |
| 149 | 149 | ||
| 150 | (defcustom buffer-offer-save nil | 150 | (defcustom buffer-offer-save nil |
| 151 | "Non-nil in a buffer means always offer to save buffer on exit. | 151 | "Non-nil in a buffer means always offer to save buffer on exiting Emacs. |
| 152 | Do so even if the buffer is not visiting a file. | 152 | Do so even if the buffer is not visiting a file. |
| 153 | Automatically local in all buffers. | 153 | Automatically local in all buffers. |
| 154 | 154 | ||
| 155 | Set to the symbol `always' to offer to save buffer whenever | 155 | Set to the symbol `always' to offer to save buffer whenever |
| 156 | `save-some-buffers' is called." | 156 | `save-some-buffers' is called. |
| 157 | |||
| 158 | Note that this option has no effect on `kill-buffer'; | ||
| 159 | if you want to control what happens when a buffer is killed, | ||
| 160 | use `kill-buffer-query-functions'." | ||
| 157 | :type '(choice (const :tag "Never" nil) | 161 | :type '(choice (const :tag "Never" nil) |
| 158 | (const :tag "On Emacs exit" t) | 162 | (const :tag "On Emacs exit" t) |
| 159 | (const :tag "Whenever save-some-buffers is called" always)) | 163 | (const :tag "Whenever save-some-buffers is called" always)) |
diff --git a/lisp/imenu.el b/lisp/imenu.el index b4d7d903595..94ee6bc83a7 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -179,7 +179,9 @@ with name concatenation." | |||
| 179 | 179 | ||
| 180 | (defcustom imenu-generic-skip-comments-and-strings t | 180 | (defcustom imenu-generic-skip-comments-and-strings t |
| 181 | "When non-nil, ignore text inside comments and strings. | 181 | "When non-nil, ignore text inside comments and strings. |
| 182 | Only affects `imenu--generic-function'." | 182 | Only affects `imenu-default-create-index-function' (and any |
| 183 | alternative implementation of `imenu-create-index-function' that | ||
| 184 | uses `imenu--generic-function')." | ||
| 183 | :type 'boolean | 185 | :type 'boolean |
| 184 | :group 'imenu | 186 | :group 'imenu |
| 185 | :version "24.4") | 187 | :version "24.4") |
| @@ -730,7 +732,7 @@ for modes which use `imenu--generic-function'. If it is not set, but | |||
| 730 | ;; so it needs to be careful never to loop! | 732 | ;; so it needs to be careful never to loop! |
| 731 | (defun imenu--generic-function (patterns) | 733 | (defun imenu--generic-function (patterns) |
| 732 | "Return an index alist of the current buffer based on PATTERNS. | 734 | "Return an index alist of the current buffer based on PATTERNS. |
| 733 | PATTERNS should be an alist with the same form as `imenu-generic-expression'. | 735 | PATTERNS should be an alist of the same form as `imenu-generic-expression'. |
| 734 | 736 | ||
| 735 | If `imenu-generic-skip-comments-and-strings' is non-nil, this ignores | 737 | If `imenu-generic-skip-comments-and-strings' is non-nil, this ignores |
| 736 | text inside comments and strings. | 738 | text inside comments and strings. |
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 1d1af825a17..e7ac2ea32b2 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el | |||
| @@ -268,7 +268,8 @@ available: | |||
| 268 | (or (eolp) (not skeleton-end-newline) (newline-and-indent)) | 268 | (or (eolp) (not skeleton-end-newline) (newline-and-indent)) |
| 269 | (run-hooks 'skeleton-end-hook) | 269 | (run-hooks 'skeleton-end-hook) |
| 270 | (sit-for 0) | 270 | (sit-for 0) |
| 271 | (or (pos-visible-in-window-p beg) | 271 | (or (not (eq (window-buffer) (current-buffer))) |
| 272 | (pos-visible-in-window-p beg) | ||
| 272 | (progn | 273 | (progn |
| 273 | (goto-char beg) | 274 | (goto-char beg) |
| 274 | (recenter 0))) | 275 | (recenter 0))) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 88052d7749b..75f458233ee 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -301,9 +301,6 @@ in the order given by 'git status'." | |||
| 301 | '("--ignored")) | 301 | '("--ignored")) |
| 302 | "--")) | 302 | "--")) |
| 303 | (status (apply #'vc-git--run-command-string file args))) | 303 | (status (apply #'vc-git--run-command-string file args))) |
| 304 | ;; Alternatively, the `ignored' state could be detected with 'git | ||
| 305 | ;; ls-files -i -o --exclude-standard', but that's an extra process | ||
| 306 | ;; call, and the `ignored' state is rarely needed. | ||
| 307 | (if (null status) | 304 | (if (null status) |
| 308 | ;; If status is nil, there was an error calling git, likely because | 305 | ;; If status is nil, there was an error calling git, likely because |
| 309 | ;; the file is not in a git repo. | 306 | ;; the file is not in a git repo. |
| @@ -568,6 +565,7 @@ or an empty string if none." | |||
| 568 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) | 565 | (declare-function vc-set-async-update "vc-dispatcher" (process-buffer)) |
| 569 | 566 | ||
| 570 | (defun vc-git-dir-status-goto-stage (git-state) | 567 | (defun vc-git-dir-status-goto-stage (git-state) |
| 568 | ;; TODO: Look into reimplementing this using `git status --porcelain=v2'. | ||
| 571 | (let ((files (vc-git-dir-status-state->files git-state))) | 569 | (let ((files (vc-git-dir-status-state->files git-state))) |
| 572 | (erase-buffer) | 570 | (erase-buffer) |
| 573 | (pcase (vc-git-dir-status-state->stage git-state) | 571 | (pcase (vc-git-dir-status-state->stage git-state) |
| @@ -584,7 +582,7 @@ or an empty string if none." | |||
| 584 | "ls-files" "-z" "-c" "-s" "--")) | 582 | "ls-files" "-z" "-c" "-s" "--")) |
| 585 | (`ls-files-conflict | 583 | (`ls-files-conflict |
| 586 | (vc-git-command (current-buffer) 'async files | 584 | (vc-git-command (current-buffer) 'async files |
| 587 | "ls-files" "-z" "-c" "-s" "--")) | 585 | "ls-files" "-z" "-u" "--")) |
| 588 | (`ls-files-unknown | 586 | (`ls-files-unknown |
| 589 | (vc-git-command (current-buffer) 'async files | 587 | (vc-git-command (current-buffer) 'async files |
| 590 | "ls-files" "-z" "-o" "--directory" | 588 | "ls-files" "-z" "-o" "--directory" |
| @@ -947,9 +945,6 @@ This prompts for a branch to merge from." | |||
| 947 | (vc-git--run-command-string directory "status" "--porcelain" "--")) | 945 | (vc-git--run-command-string directory "status" "--porcelain" "--")) |
| 948 | (lines (when status (split-string status "\n" 'omit-nulls))) | 946 | (lines (when status (split-string status "\n" 'omit-nulls))) |
| 949 | files) | 947 | files) |
| 950 | ;; TODO: Look into reimplementing `vc-git-state', as well as | ||
| 951 | ;; `vc-git-dir-status-files', based on this output, thus making the | ||
| 952 | ;; extra process call in `vc-git-find-file-hook' unnecessary. | ||
| 953 | (dolist (line lines files) | 948 | (dolist (line lines files) |
| 954 | (when (string-match "\\([ MADRCU?!][ MADRCU?!]\\) \\(.+\\)\\(?: -> \\(.+\\)\\)?" | 949 | (when (string-match "\\([ MADRCU?!][ MADRCU?!]\\) \\(.+\\)\\(?: -> \\(.+\\)\\)?" |
| 955 | line) | 950 | line) |
| @@ -984,15 +979,10 @@ This prompts for a branch to merge from." | |||
| 984 | (defun vc-git-find-file-hook () | 979 | (defun vc-git-find-file-hook () |
| 985 | "Activate `smerge-mode' if there is a conflict." | 980 | "Activate `smerge-mode' if there is a conflict." |
| 986 | (when (and buffer-file-name | 981 | (when (and buffer-file-name |
| 987 | ;; FIXME | 982 | (eq (vc-state buffer-file-name 'Git) 'conflict) |
| 988 | ;; 1) the net result is to call git twice per file. | ||
| 989 | ;; 2) v-g-c-f is documented to take a directory. | ||
| 990 | ;; https://lists.gnu.org/r/emacs-devel/2014-01/msg01126.html | ||
| 991 | (vc-git-conflicted-files buffer-file-name) | ||
| 992 | (save-excursion | 983 | (save-excursion |
| 993 | (goto-char (point-min)) | 984 | (goto-char (point-min)) |
| 994 | (re-search-forward "^<<<<<<< " nil 'noerror))) | 985 | (re-search-forward "^<<<<<<< " nil 'noerror))) |
| 995 | (vc-file-setprop buffer-file-name 'vc-state 'conflict) | ||
| 996 | (smerge-start-session) | 986 | (smerge-start-session) |
| 997 | (when vc-git-resolve-conflicts | 987 | (when vc-git-resolve-conflicts |
| 998 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) | 988 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)) |