diff options
Diffstat (limited to 'lisp')
36 files changed, 454 insertions, 199 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b90c3c98ad..5c91db50037 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,134 @@ +2014-07-04 Michael Albinus <michael.albinus@gmx.de> + + * net/dbus.el (dbus-peer-handler): New defun. + (dbus-register-service): Register it. (Bug#17858) + (dbus-managed-objects-handler): Fix docstring. + +2014-07-04 Phil Sainty <psainty@orcon.net.nz> (tiny change) + + * emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var. + (narrow-to-defun): New arg include-comments, defaulting to it + (bug#16328). + +2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * rect.el (rectangle--highlight-for-redisplay): Don't pass `orig' with + different calling convention to rectangle--unhighlight-for-redisplay. + +2014-07-03 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp.el (tramp-call-process): Handle error strings. + + * net/tramp-adb.el (tramp-adb-sh-fix-ls-output): Use `bolp'. + + * net/tramp-sh.el (tramp-sh-handle-set-visited-file-modtime) + (tramp-sh-handle-verify-visited-file-modtime): Use `point-at-eol'. + + * net/trampver.el: Update release number. + +2014-07-03 Juri Linkov <juri@jurta.org> + + * desktop.el (desktop-save): Rename arg `auto-save' to + `only-if-changed'. Doc fix. (Bug#17873) + +2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * mouse.el (mouse-yank-primary, mouse-yank-secondary): + Use insert-for-yank (bug#17271). + +2014-07-03 Leo Liu <sdl.web@gmail.com> + + * emacs-lisp/pp.el (pp-eval-expression, pp-eval-last-sexp): + Support lexical-binding. + +2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * vc/log-edit.el (log-edit-goto-eoh): New function. + (log-edit--match-first-line): Use it (bug#17861). + +2014-07-03 Glenn Morris <rgm@gnu.org> + + * vc/log-edit.el (log-edit-hook): Add missing :version. + +2014-07-03 Fabián Ezequiel Gallina <fgallina@gnu.org> + + * progmodes/python.el (python-indent-post-self-insert-function): + Enhancements to electric indentation behavior inside + parens. (Bug#17658) + +2014-07-03 Stefan Monnier <monnier@iro.umontreal.ca> + + * ps-def.el (ps-generate-postscript-with-faces1): Don't mess with + buffer-invisibility-spec (bug#17867). + +2014-07-03 Andreas Schwab <schwab@linux-m68k.org> + + * vc/vc-git.el (vc-git-checkin): When operating on the whole tree + pass "-a". + +2014-07-03 Glenn Morris <rgm@gnu.org> + + * cus-edit.el (help): + * finder.el (finder-known-keywords): + * help.el (help-for-help-internal): + * vc/ediff-mult.el (ediff-meta-buffer-verbose-message) + (ediff-redraw-registry-buffer): + * vc/ediff-ptch.el (ediff-patch-file-internal): + Doc fixes re "online" help. (Bug#17803) + + * progmodes/idlwave.el (idlwave): Update url-link for custom group. + (idlwave-mode): Doc URL update. + +2014-07-01 Juri Linkov <juri@jurta.org> + + * man.el: Display man pages immediately and use process-filter + to format them asynchronously. + (Man-width): Doc fix. + (man): Doc fix. + (Man-start-calling): Use `with-selected-window' to get + `frame-width' and `window-width'. + (Man-getpage-in-background): Call `Man-notify-when-ready' + immediately after creating a new buffer. Call `Man-mode' and set + `mode-line-process' in the created buffer. Set process-filter to + `Man-bgproc-filter' in start-process branch. In call-process branch + call either `Man-fontify-manpage' or `Man-cleanup-manpage'. + Use `Man-start-calling' inside `with-current-buffer'. + (Man-fontify-manpage): Don't print messages. Fix boundary condition. + (Man-cleanup-manpage): Don't print messages. + (Man-bgproc-filter): New function. + (Man-bgproc-sentinel): Add `save-excursion' to keep point when + user moved it during asynchronous formatting. Move calls of + `Man-fontify-manpage' and `Man-cleanup-manpage' to + `Man-bgproc-filter'. Move the call of `Man-mode' to + `Man-getpage-in-background'. Use `quit-restore-window' + instead of `kill-buffer'. Use `message' instead of `error' + because errors are caught by process sentinel. + (Man-mode): Move calls of `Man-build-page-list', + `Man-strip-page-headers', `Man-unindent', `Man-goto-page' to + `Man-bgproc-sentinel'. Doc fix. (Bug#2588, bug#5054, bug#9084, bug#17831) + + * man.el (Man-bgproc-sentinel): Use `Man-page-from-arguments' + for the message about the man page cleaned up. + +2014-07-01 Mario Lang <mlang@delysid.org> + + * net/gnutls.el (gnutls-negotiate): Prevent destructive modification of + cosutomization option `gnutls-verify-error'. + +2014-07-01 Stefan Monnier <monnier@iro.umontreal.ca> + + * simple.el (deactivate-mark, set-mark-command, handle-shift-selection): + Don't keep transient-mark-mode buffer-local when not needed (bug#6316). + + * xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal) + (turn-off-xterm-mouse-tracking-on-terminal): Don't burp if the terminal + is suspended (bug#17857). + +2014-07-01 Michael Albinus <michael.albinus@gmx.de> + + * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): + Prefer utf-8 coding. (Bug#17859) + 2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org> * emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias @@ -35,8 +166,7 @@ Don't call c-parse-state when c++-template-syntax-table is active. * progmodes/cc-engine.el (c-guess-continued-construct CASE G) (c-guess-basic-syntax CASE 5D.3): Rearrange so that - c-syntactic-skip-backwards isn't called with the pertinent syntax - table. + c-syntactic-skip-backwards isn't called with the pertinent syntax table. 2014-06-28 Stephen Berman <stephen.berman@gmx.net> @@ -1638,7 +1768,7 @@ Remove HISTFILE and HISTSIZE; it's too late to set them here. Add :version entry. (tramp-open-shell): Do not let-bind `tramp-end-of-output'. - Add "HISTSIZE=/dev/null" to the shell's env arguments. Do not send + Add "HISTFILE=/dev/null" to the shell's env arguments. Do not send extra "PSx=..." commands. (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null. (Bug#17295) @@ -3338,7 +3468,7 @@ 2014-03-10 Michael Albinus <michael.albinus@gmx.de> * net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): - Do not add `nil' to the environment, when there's no remote `locale'. + Do not add nil to the environment, when there's no remote `locale'. (tramp-find-inline-encoding): Check, that the remote host has installed perl, before sending scripts. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 212e29069eb..b54898a171c 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -324,7 +324,7 @@ :group 'emacs) (defgroup help nil - "Support for on-line help systems." + "Support for Emacs help systems." :group 'emacs) (defgroup multimedia nil diff --git a/lisp/desktop.el b/lisp/desktop.el index 26d288bf9cd..4bb6fba3532 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -942,12 +942,13 @@ Frames with a non-nil `desktop-dont-save' parameter are not saved." :predicate #'desktop--check-dont-save)))) ;;;###autoload -(defun desktop-save (dirname &optional release auto-save) +(defun desktop-save (dirname &optional release only-if-changed) "Save the desktop in a desktop file. Parameter DIRNAME specifies where to save the desktop file. Optional parameter RELEASE says whether we're done with this desktop. -If AUTO-SAVE is non-nil, compare the saved contents to the one last saved, -and don't save the buffer if they are the same." +If ONLY-IF-CHANGED is non-nil, compare the current desktop information +to that in the desktop file, and if the desktop information has not +changed since it was last saved then do not rewrite the file." (interactive (list ;; Or should we just use (car desktop-path)? (let ((default (if (member "." desktop-path) @@ -1020,7 +1021,7 @@ and don't save the buffer if they are the same." (setq default-directory desktop-dirname) ;; When auto-saving, avoid writing if nothing has changed since the last write. - (let* ((beg (and auto-save + (let* ((beg (and only-if-changed (save-excursion (goto-char (point-min)) ;; Don't check the header with changing timestamp diff --git a/lisp/ehelp.el b/lisp/ehelp.el index dd6c6c4cb28..46db552c3f5 100644 --- a/lisp/ehelp.el +++ b/lisp/ehelp.el @@ -25,7 +25,7 @@ ;;; Commentary: ;; This package provides a pre-packaged `Electric Help Mode' for -;; browsing on-line help screens. There is one entry point, +;; browsing Emacs help screens. There is one entry point, ;; `with-electric-help'; all you have to give it is a no-argument ;; function that generates the actual text of the help into the current ;; buffer. diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 23b021df177..30fee64635c 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -522,11 +522,15 @@ it marks the next defun after the ones already marked." (beginning-of-defun)) (re-search-backward "^\n" (- (point) 1) t))))) -(defun narrow-to-defun (&optional _arg) +(defvar narrow-to-defun-include-comments nil + "If non-nil, `narrow-to-defun' will also show comments preceding the defun.") + +(defun narrow-to-defun (&optional include-comments) "Make text outside current defun invisible. -The defun visible is the one that contains point or follows point. -Optional ARG is ignored." - (interactive) +The current defun is the one that contains point or follows point. +Preceding comments are included if INCLUDE-COMMENTS is non-nil. +Interactively, the behavior depends on `narrow-to-defun-include-comments'." + (interactive (list narrow-to-defun-include-comments)) (save-excursion (widen) (let ((opoint (point)) @@ -562,6 +566,18 @@ Optional ARG is ignored." (setq end (point)) (beginning-of-defun) (setq beg (point))) + (when include-comments + (goto-char beg) + ;; Move back past all preceding comments (and whitespace). + (when (forward-comment -1) + (while (forward-comment -1)) + ;; Move forwards past any page breaks within these comments. + (when (and page-delimiter (not (string= page-delimiter ""))) + (while (re-search-forward page-delimiter beg t))) + ;; Lastly, move past any empty lines. + (skip-chars-forward "[:space:]\n") + (beginning-of-line) + (setq beg (point)))) (goto-char end) (re-search-backward "^\n" (- (point) 1) t) (narrow-to-region beg end)))) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 0e4139e1aeb..dd012fab9da 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -129,7 +129,7 @@ Also add the value to the front of the list in the variable `values'." (interactive (list (read--expression "Eval: "))) (message "Evaluating...") - (setq values (cons (eval expression) values)) + (setq values (cons (eval expression lexical-binding) values)) (pp-display-expression (car values) "*Pp Eval Output*")) ;;;###autoload @@ -165,7 +165,7 @@ With argument, pretty-print output into current buffer. Ignores leading comment characters." (interactive "P") (if arg - (insert (pp-to-string (eval (pp-last-sexp)))) + (insert (pp-to-string (eval (pp-last-sexp) lexical-binding))) (pp-eval-expression (pp-last-sexp)))) ;;;###autoload diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 650b8acbb81..d1353bdc8fa 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -107,7 +107,7 @@ ;; ---------------- ;; Bug reports and ideas contributed by many users have helped ;; improve Viper and the various versions of VIP. -;; See the on-line manual for a complete list of contributors. +;; See the manual for a complete list of contributors. ;; ;; ;;; Notes: diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 8d2ea62b231..d43be54de2b 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -9,7 +9,7 @@ ;; Andreas Fuchs (afs@void.at) ;; Gergely Nagy (algernon@midgard.debian.net) ;; David Edmondson (dme@dme.org) -;; Kelvin White <kelvin.white77@gmail.com> +;; Kelvin White (kwhite@gnu.org) ;; Maintainer: emacs-devel@gnu.org ;; Keywords: IRC, chat, client, Internet ;; Version: 5.3 @@ -4252,7 +4252,7 @@ also `erc-format-nick-function'." (let ((nick (erc-server-user-nickname user))) (concat (erc-propertize (erc-get-user-mode-prefix nick) - 'face 'erc-nick-prefix-face) nick nick)))) + 'face 'erc-nick-prefix-face) nick)))) (defun erc-format-my-nick () "Return the beginning of this user's message, correctly propertized." diff --git a/lisp/finder.el b/lisp/finder.el index 092a2ddd8a4..bb5b441e26d 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -52,7 +52,7 @@ (frames . "Emacs frames and window systems") (games . "games, jokes and amusements") (hardware . "interfacing with system hardware") - (help . "on-line help systems") + (help . "Emacs help systems") (hypermedia . "links between text or other media types") (i18n . "internationalization and character-set support") (internal . "code for Emacs internals, build process, defaults") diff --git a/lisp/help.el b/lisp/help.el index 8ba3d86004b..63a658f391c 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -23,7 +23,7 @@ ;;; Commentary: -;; This code implements GNU Emacs's on-line help system, the one invoked by +;; This code implements GNU Emacs's built-in help system, the one invoked by ;; `M-x help-for-help'. ;;; Code: @@ -198,13 +198,13 @@ d PATTERN Show a list of functions, variables, and other items whose documentation matches the PATTERN (a list of words or a regexp). e Go to the *Messages* buffer which logs echo-area messages. f FUNCTION Display documentation for the given function. -F COMMAND Show the on-line manual's section that describes the command. +F COMMAND Show the Emacs manual's section that describes the command. g Display information about the GNU project. h Display the HELLO file which illustrates various scripts. -i Start the Info documentation reader: read on-line manuals. +i Start the Info documentation reader: read included manuals. I METHOD Describe a specific input method, or RET for current. k KEYS Display the full documentation for the key sequence. -K KEYS Show the on-line manual's section for the command bound to KEYS. +K KEYS Show the Emacs manual's section for the command bound to KEYS. l Show last 300 input keystrokes (lossage). L LANG-ENV Describes a specific language environment, or RET for current. m Display documentation of current minor modes and current major mode, @@ -214,7 +214,7 @@ p TOPIC Find packages matching a given topic keyword. P PACKAGE Describe the given Emacs Lisp package. r Display the Emacs manual in Info mode. s Display contents of current syntax table, plus explanations. -S SYMBOL Show the section for the given symbol in the on-line manual +S SYMBOL Show the section for the given symbol in the Info manual for the programming language used in this buffer. t Start the Emacs learn-by-doing tutorial. v VARIABLE Display the given variable's documentation and value. diff --git a/lisp/man.el b/lisp/man.el index 35fab2040a5..4b235302f8b 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -173,13 +173,12 @@ Any other value of `Man-notify-method' is equivalent to `meek'." (defcustom Man-width nil "Number of columns for which manual pages should be formatted. -If nil, the width of the window selected at the moment of man -invocation is used. If non-nil, the width of the frame selected -at the moment of man invocation is used. The value also can be a -positive integer." +If nil, use the width of the window where the manpage is displayed. +If non-nil, use the width of the frame where the manpage is displayed. +The value also can be a positive integer for a fixed width." :type '(choice (const :tag "Window width" nil) (const :tag "Frame width" t) - (integer :tag "Specific width" :value 65)) + (integer :tag "Fixed width" :value 65)) :group 'man) (defcustom Man-frame-parameters nil @@ -930,12 +929,14 @@ test/automated/man-tests.el in the emacs bzr repository." ;;;###autoload (defun man (man-args) "Get a Un*x manual page and put it in a buffer. -This command is the top-level command in the man package. It -runs a Un*x command to retrieve and clean a manpage in the +This command is the top-level command in the man package. +It runs a Un*x command to retrieve and clean a manpage in the background and places the results in a `Man-mode' browsing -buffer. See variable `Man-notify-method' for what happens when -the buffer is ready. If a buffer already exists for this man -page, it will display immediately. +buffer. The variable `Man-width' defines the number of columns in +formatted manual pages. The buffer is displayed immediately. +The variable `Man-notify-method' defines how the buffer is displayed. +If a buffer already exists for this man page, it will be displayed +without running the man command. For a manpage from a particular section, use either of the following. \"cat(1)\" is how cross-references appear and is @@ -1030,15 +1031,22 @@ names or descriptions. The pattern argument is usually an ;; ther is available). (when (or window-system (not (or (getenv "MANWIDTH") (getenv "COLUMNS")))) - ;; This isn't strictly correct, since we don't know how - ;; the page will actually be displayed, but it seems - ;; reasonable. + ;; Since the page buffer is displayed beforehand, + ;; we can select its window and get the window/frame width. (setenv "COLUMNS" (number-to-string (cond ((and (integerp Man-width) (> Man-width 0)) Man-width) - (Man-width (frame-width)) - ((window-width)))))) + (Man-width + (if (window-live-p (get-buffer-window (current-buffer) t)) + (with-selected-window (get-buffer-window (current-buffer) t) + (frame-width)) + (frame-width))) + (t + (if (window-live-p (get-buffer-window (current-buffer) t)) + (with-selected-window (get-buffer-window (current-buffer) t) + (window-width)) + (window-width))))))) ;; Since man-db 2.4.3-1, man writes plain text with no escape ;; sequences when stdout is not a tty. In 2.5.0, the following ;; env-var was added to allow control of this (see Debian Bug#340673). @@ -1057,33 +1065,45 @@ Return the buffer in which the manpage will appear." (message "Invoking %s %s in the background" manual-program man-args) (setq buffer (generate-new-buffer bufname)) (with-current-buffer buffer + (Man-notify-when-ready buffer) (setq buffer-undo-list t) (setq Man-original-frame (selected-frame)) - (setq Man-arguments man-args)) - (Man-start-calling - (if (fboundp 'start-process) - (set-process-sentinel - (start-process manual-program buffer - (if (memq system-type '(cygwin windows-nt)) - shell-file-name - "sh") - shell-command-switch - (format (Man-build-man-command) man-args)) - 'Man-bgproc-sentinel) - (let ((exit-status - (call-process shell-file-name nil (list buffer nil) nil - shell-command-switch - (format (Man-build-man-command) man-args))) - (msg "")) - (or (and (numberp exit-status) - (= exit-status 0)) - (and (numberp exit-status) - (setq msg - (format "exited abnormally with code %d" - exit-status))) - (setq msg exit-status)) - (Man-bgproc-sentinel bufname msg))))) - buffer)) + (setq Man-arguments man-args) + (Man-mode) + (setq mode-line-process + (concat " " (propertize (if Man-fontify-manpage-flag + "[formatting...]" + "[cleaning...]") + 'face 'mode-line-emphasis))) + (Man-start-calling + (if (fboundp 'start-process) + (let ((proc (start-process + manual-program buffer + (if (memq system-type '(cygwin windows-nt)) + shell-file-name + "sh") + shell-command-switch + (format (Man-build-man-command) man-args)))) + (set-process-sentinel proc 'Man-bgproc-sentinel) + (set-process-filter proc 'Man-bgproc-filter)) + (let* ((inhibit-read-only t) + (exit-status + (call-process shell-file-name nil (list buffer nil) nil + shell-command-switch + (format (Man-build-man-command) man-args))) + (msg "")) + (or (and (numberp exit-status) + (= exit-status 0)) + (and (numberp exit-status) + (setq msg + (format "exited abnormally with code %d" + exit-status))) + (setq msg exit-status)) + (if Man-fontify-manpage-flag + (Man-fontify-manpage) + (Man-cleanup-manpage)) + (Man-bgproc-sentinel bufname msg)))))) + buffer)) (defun Man-update-manpage () "Reformat current manpage by calling the man command again synchronously." @@ -1168,7 +1188,6 @@ See the variable `Man-notify-method' for the different notification behaviors." "Convert overstriking and underlining to the correct fonts. Same for the ANSI bold and normal escape sequences." (interactive) - (message "Please wait: formatting the %s man page..." Man-arguments) (goto-char (point-min)) ;; Fontify ANSI escapes. (let ((ansi-color-apply-face-function @@ -1183,7 +1202,7 @@ Same for the ANSI bold and normal escape sequences." ;; Multibyte characters exist. (progn (goto-char (point-min)) - (while (search-forward "__\b\b" nil t) + (while (and (search-forward "__\b\b" nil t) (not (eobp))) (backward-delete-char 4) (put-text-property (point) (1+ (point)) 'face 'Man-underline)) (goto-char (point-min)) @@ -1191,7 +1210,7 @@ Same for the ANSI bold and normal escape sequences." (backward-delete-char 4) (put-text-property (1- (point)) (point) 'face 'Man-underline)))) (goto-char (point-min)) - (while (search-forward "_\b" nil t) + (while (and (search-forward "_\b" nil t) (not (eobp))) (backward-delete-char 2) (put-text-property (point) (1+ (point)) 'face 'Man-underline)) (goto-char (point-min)) @@ -1223,8 +1242,7 @@ Same for the ANSI bold and normal escape sequences." (while (re-search-forward Man-heading-regexp nil t) (put-text-property (match-beginning 0) (match-end 0) - 'face 'Man-overstrike))) - (message "%s man page formatted" (Man-page-from-arguments Man-arguments))) + 'face 'Man-overstrike)))) (defun Man-highlight-references (&optional xref-man-type) "Highlight the references on mouse-over. @@ -1286,8 +1304,6 @@ Normally skip any jobs that should have been done by the sed script, but when called interactively, do those jobs even if the sed script would have done them." (interactive "p") - (message "Please wait: cleaning up the %s man page..." - Man-arguments) (if (or interactive (not Man-sed-script)) (progn (goto-char (point-min)) @@ -1309,8 +1325,35 @@ script would have done them." ;; their preceding chars (but don't put Man-overstrike). (Bug#5566) (goto-char (point-min)) (while (re-search-forward ".\b" nil t) (backward-delete-char 2)) - (Man-softhyphen-to-minus) - (message "%s man page cleaned up" Man-arguments)) + (Man-softhyphen-to-minus)) + +(defun Man-bgproc-filter (process string) + "Manpage background process filter. +When manpage command is run asynchronously, PROCESS is the process +object for the manpage command; when manpage command is run +synchronously, PROCESS is the name of the buffer where the manpage +command is run. Second argument STRING is the entire string of output." + (save-excursion + (let ((Man-buffer (process-buffer process))) + (if (null (buffer-name Man-buffer)) ;; deleted buffer + (set-process-buffer process nil) + + (with-current-buffer Man-buffer + (let ((inhibit-read-only t) + (beg (marker-position (process-mark process)))) + (save-excursion + (goto-char beg) + (insert string) + (save-restriction + (narrow-to-region + (save-excursion + (goto-char beg) + (line-beginning-position)) + (point)) + (if Man-fontify-manpage-flag + (Man-fontify-manpage) + (Man-cleanup-manpage))) + (set-marker (process-mark process) (point-max))))))))) (defun Man-bgproc-sentinel (process msg) "Manpage background process sentinel. @@ -1329,63 +1372,75 @@ manpage command." (set-process-buffer process nil)) (with-current-buffer Man-buffer - (let ((case-fold-search nil)) - (goto-char (point-min)) - (cond ((or (looking-at "No \\(manual \\)*entry for") - (looking-at "[^\n]*: nothing appropriate$")) - (setq err-mess (buffer-substring (point) - (progn - (end-of-line) (point))) - delete-buff t)) - - ;; "-k foo", successful exit, but no output (from man-db) - ;; ENHANCE-ME: share the check for -k with - ;; `Man-highlight-references'. The \\s- bits here are - ;; meant to allow for multiple options with -k among them. - ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments) - (eq (process-status process) 'exit) - (= (process-exit-status process) 0) - (= (point-min) (point-max))) - (setq err-mess (format "%s: no matches" Man-arguments) - delete-buff t)) - - ((or (stringp process) - (not (and (eq (process-status process) 'exit) - (= (process-exit-status process) 0)))) - (or (zerop (length msg)) - (progn - (setq err-mess - (concat (buffer-name Man-buffer) - ": process " - (let ((eos (1- (length msg)))) - (if (= (aref msg eos) ?\n) - (substring msg 0 eos) msg)))) - (goto-char (point-max)) - (insert (format "\nprocess %s" msg)))) - )) - (if delete-buff - (kill-buffer Man-buffer) - (if Man-fontify-manpage-flag - (Man-fontify-manpage) - (Man-cleanup-manpage)) - - (run-hooks 'Man-cooked-hook) - (Man-mode) - - (if (not Man-page-list) - (let ((args Man-arguments)) - (kill-buffer (current-buffer)) - (user-error "Can't find the %s manpage" - (Man-page-from-arguments args))) - (set-buffer-modified-p nil)))) - ;; Restore case-fold-search before calling - ;; Man-notify-when-ready because it may switch buffers. - - (if (not delete-buff) - (Man-notify-when-ready Man-buffer)) + (save-excursion + (let ((case-fold-search nil)) + (goto-char (point-min)) + (cond ((or (looking-at "No \\(manual \\)*entry for") + (looking-at "[^\n]*: nothing appropriate$")) + (setq err-mess (buffer-substring (point) + (progn + (end-of-line) (point))) + delete-buff t)) + + ;; "-k foo", successful exit, but no output (from man-db) + ;; ENHANCE-ME: share the check for -k with + ;; `Man-highlight-references'. The \\s- bits here are + ;; meant to allow for multiple options with -k among them. + ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments) + (eq (process-status process) 'exit) + (= (process-exit-status process) 0) + (= (point-min) (point-max))) + (setq err-mess (format "%s: no matches" Man-arguments) + delete-buff t)) + + ((or (stringp process) + (not (and (eq (process-status process) 'exit) + (= (process-exit-status process) 0)))) + (or (zerop (length msg)) + (progn + (setq err-mess + (concat (buffer-name Man-buffer) + ": process " + (let ((eos (1- (length msg)))) + (if (= (aref msg eos) ?\n) + (substring msg 0 eos) msg)))) + (goto-char (point-max)) + (insert (format "\nprocess %s" msg)))) + )) + (if delete-buff + (if (window-live-p (get-buffer-window Man-buffer t)) + (quit-restore-window + (get-buffer-window Man-buffer t) 'kill) + (kill-buffer Man-buffer)) + + (run-hooks 'Man-cooked-hook) + + (Man-build-page-list) + (Man-strip-page-headers) + (Man-unindent) + (Man-goto-page 1 t) + + (if (not Man-page-list) + (let ((args Man-arguments)) + (if (window-live-p (get-buffer-window (current-buffer) t)) + (quit-restore-window + (get-buffer-window (current-buffer) t) 'kill) + (kill-buffer (current-buffer))) + (message "Can't find the %s manpage" + (Man-page-from-arguments args))) + + (if Man-fontify-manpage-flag + (message "%s man page formatted" + (Man-page-from-arguments Man-arguments)) + (message "%s man page cleaned up" + (Man-page-from-arguments Man-arguments))) + (unless (and (processp process) + (not (eq (process-status process) 'exit))) + (setq mode-line-process nil)) + (set-buffer-modified-p nil))))) (if err-mess - (error "%s" err-mess)) + (message "%s" err-mess)) )))) (defun Man-page-from-arguments (args) @@ -1429,7 +1484,7 @@ The following man commands are available in the buffer. Try The following variables may be of some use. Try \"\\[describe-variable] <variable-name> RET\" for more information: -`Man-notify-method' What happens when manpage formatting is done. +`Man-notify-method' What happens when manpage is ready to display. `Man-downcase-section-letters-flag' Force section letters to lower case. `Man-circular-pages-flag' Treat multiple manpage list as circular. `Man-section-translations-alist' List of section numbers and their Un*x equiv. @@ -1458,11 +1513,7 @@ The following key bindings are currently in effect in the buffer: (set (make-local-variable 'outline-regexp) Man-heading-regexp) (set (make-local-variable 'outline-level) (lambda () 1)) (set (make-local-variable 'bookmark-make-record-function) - 'Man-bookmark-make-record) - (Man-build-page-list) - (Man-strip-page-headers) - (Man-unindent) - (Man-goto-page 1 t)) + 'Man-bookmark-make-record)) (defsubst Man-build-section-alist () "Build the list of manpage sections." @@ -1516,7 +1567,6 @@ The following key bindings are currently in effect in the buffer: (page-end (point-max)) (header "")) (goto-char page-start) - ;; (switch-to-buffer (current-buffer))(debug) (while (not (eobp)) (setq header (if (looking-at Man-page-header-regexp) diff --git a/lisp/mouse.el b/lisp/mouse.el index 7beea8e26e6..d3bcf02f217 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1079,7 +1079,7 @@ regardless of where you click." (unless primary (error "No selection is available")) (push-mark (point)) - (insert primary))) + (insert-for-yank primary))) (defun mouse-kill-ring-save (click) "Copy the region between point and the mouse click in the kill ring. @@ -1361,7 +1361,7 @@ regardless of where you click." (or mouse-yank-at-point (mouse-set-point click)) (let ((secondary (x-get-selection 'SECONDARY))) (if secondary - (insert secondary) + (insert-for-yank secondary) (error "No secondary selection")))) (defun mouse-kill-secondary () diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 66170dafef8..582f54faf4e 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -544,6 +544,10 @@ placed in the queue. `:already-owner': Service is already the primary owner." + ;; Add Peer handler. + (dbus-register-method + bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register) + ;; Add ObjectManager handler. (dbus-register-method bus service nil dbus-interface-objectmanager "GetManagedObjects" @@ -1151,6 +1155,22 @@ apply bus service dbus-path-dbus dbus-interface-peer "Ping"))) (dbus-error nil))) +(defun dbus-peer-handler () + "Default handler for the \"org.freedesktop.DBus.Peer\" interface. +It will be registered for all objects created by `dbus-register-service'." + (let* ((last-input-event last-input-event) + (method (dbus-event-member-name last-input-event))) + (cond + ;; "Ping" does not return an output parameter. + ((string-equal method "Ping") + :ignore) + ;; "GetMachineId" returns "s". + ((string-equal method "GetMachineId") + (signal + 'dbus-error + (list + (format "%s.GetMachineId not implemented" dbus-interface-peer))))))) + ;;; D-Bus introspection. @@ -1672,7 +1692,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow." (defun dbus-managed-objects-handler () "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface. -It will be registered for all objects created by `dbus-register-method'." +It will be registered for all objects created by `dbus-register-service'." (let* ((last-input-event last-input-event) (bus (dbus-event-bus-name last-input-event)) (path (dbus-event-path-name last-input-event))) diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index ea4c0351be7..0c650f38d95 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -214,7 +214,7 @@ defaults to GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT." (cl-mapcan (lambda (check) (when (string-match (car check) hostname) - (cdr check))) + (copy-sequence (cdr check)))) gnutls-verify-error)) ;; else it's nil (t nil)))) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 4f6d5807ba5..16017eebba3 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -458,9 +458,7 @@ Emacs dired can't find files." (insert " " (mapconcat 'identity sorted-lines "\n "))) ;; Add final newline. (goto-char (point-max)) - (unless (= (point) (line-beginning-position)) - (insert "\n")))) - + (unless (bolp) (insert "\n")))) (defun tramp-adb-ls-output-time-less-p (a b) "Sort \"ls\" output by time, descending." diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 68f1ef472f1..315bc08d0ef 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1265,8 +1265,7 @@ target of the symlink differ." (format "%s -ild %s" (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) - (setq attr (buffer-substring (point) - (progn (end-of-line) (point))))) + (setq attr (buffer-substring (point) (point-at-eol)))) (tramp-set-file-property v localname "visited-file-modtime-ild" attr)) (when (boundp 'last-coding-system-used) @@ -1317,8 +1316,7 @@ of." (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) (with-current-buffer (tramp-get-buffer v) - (setq attr (buffer-substring - (point) (progn (end-of-line) (point))))) + (setq attr (buffer-substring (point) (point-at-eol)))) (equal attr (tramp-get-file-property @@ -3964,15 +3962,16 @@ process to set up. VEC specifies the connection." ;; Try to set up the coding system correctly. ;; CCC this can't be the right way to do it. Hm. (tramp-message vec 5 "Determining coding system") - (tramp-send-command vec "echo foo ; echo bar" t) (with-current-buffer (process-buffer proc) - (goto-char (point-min)) (if (featurep 'mule) ;; Use MULE to select the right EOL convention for communicating ;; with the process. - (let* ((cs (or (tramp-compat-funcall 'process-coding-system proc) - (cons 'undecided 'undecided))) - cs-decode cs-encode) + (let ((cs (or (when (string-match + "utf8" (or (tramp-get-remote-locale vec) "")) + (cons 'utf-8 'utf-8)) + (tramp-compat-funcall 'process-coding-system proc) + (cons 'undecided 'undecided))) + cs-decode cs-encode) (when (symbolp cs) (setq cs (cons cs cs))) (setq cs-decode (car cs)) (setq cs-encode (cdr cs)) @@ -3980,6 +3979,8 @@ process to set up. VEC specifies the connection." (unless cs-encode (setq cs-encode 'undecided)) (setq cs-encode (tramp-compat-coding-system-change-eol-conversion cs-encode 'unix)) + (tramp-send-command vec "echo foo ; echo bar" t) + (goto-char (point-min)) (when (search-forward "\r" nil t) (setq cs-decode (tramp-compat-coding-system-change-eol-conversion cs-decode 'dos))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 6be737eb3f0..921c70135df 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4127,10 +4127,9 @@ ALIST is of the form ((FROM . TO) ...)." (defun tramp-call-process (vec program &optional infile destination display &rest args) "Calls `call-process' on the local host. -This is needed because for some Emacs flavors Tramp has -defadvised `call-process' to behave like `process-file'. The -Lisp error raised when PROGRAM is nil is trapped also, returning 1. -Furthermore, traces are written with verbosity of 6." +It always returns a return code. The Lisp error raised when +PROGRAM is nil is trapped also, returning 1. Furthermore, traces +are written with verbosity of 6." (let ((v (or vec (vector tramp-current-method tramp-current-user tramp-current-host nil nil))) @@ -4144,6 +4143,9 @@ Furthermore, traces are written with verbosity of 6." (setq result (apply 'call-process program infile (or destination t) display args)) + ;; `result' could also be an error string. + (when (stringp result) + (signal 'file-error (list result))) (with-current-buffer (if (bufferp destination) destination (current-buffer)) (tramp-message v 6 "%d\n%s" result (buffer-string)))) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 9c0beb114bc..065c3f33ebe 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -24,14 +24,14 @@ ;;; Code: -;; In the Tramp CVS repository, the version number and the bug report +;; In the Tramp GIT repository, the version number and the bug report ;; address are auto-frobbed from configure.ac, so you should edit that ;; file and run "autoconf && ./configure" to change them. (X)Emacs ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.10" +(defconst tramp-version "2.2.11-pre" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.10 is not fit for %s" + (format "Tramp 2.2.11-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 6431fa4aaf2..c7f018f5f15 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -71,8 +71,8 @@ ;; For example: ;; (add-to-list 'auto-mode-alist '("\\.f\\'" . f90-mode)) -;; Once you have entered f90-mode, you may get more info by using -;; the command describe-mode (C-h m). For online help use +;; Once you have entered f90-mode, you can get more info by using +;; the command describe-mode (C-h m). For help use ;; C-h f <Name of function you want described>, or ;; C-h v <Name of variable you want described>. diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 6585668b927..f6562f32e94 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -138,7 +138,8 @@ (defcustom hide-ifdef-exclude-define-regexp nil "Ignore #define names if those names match this exclusion pattern." - :type 'string) + :type 'string + :version "24.5") (defvar hide-ifdef-mode-submap ;; Set up the submap that goes after the prefix key. diff --git a/lisp/progmodes/idlw-complete-structtag.el b/lisp/progmodes/idlw-complete-structtag.el index 39951730ab3..6cb04a03b7e 100644 --- a/lisp/progmodes/idlw-complete-structtag.el +++ b/lisp/progmodes/idlw-complete-structtag.el @@ -49,14 +49,14 @@ ;; ;; New versions of IDLWAVE, documentation, and more information available ;; from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION ;; ============ ;; Put this file on the emacs load path and load it with the following ;; line in your init file: ;; -;; (add-hook 'idlwave-load-hook +;; (add-hook 'idlwave-load-hook ;; (lambda () (require 'idlw-complete-structtag))) ;; ;; DESCRIPTION diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index b9c41c9d699..3d42fe231bd 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -32,7 +32,7 @@ ;; along with new versions of IDLWAVE, documentation, and more ;; information, at: ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index a0683d1c409..876695b0809 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -40,7 +40,7 @@ ;; ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION: ;; ============= @@ -58,7 +58,7 @@ ;; The newest version of this file can be found on the maintainers ;; web site. ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; DOCUMENTATION ;; ============= @@ -923,7 +923,7 @@ IDL has currently stepped.") Info documentation for this package is available. Use \\[idlwave-info] to display (complain to your sysadmin if that does not work). For PostScript and HTML versions of the documentation, check IDLWAVE's - homepage at URL `http://idlwave.org'. + homepage at URL `http://github.com/jdtsmith/idlwave'. IDLWAVE has customize support - see the group `idlwave'. 8. Keybindings diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 7844890c22a..45672be7d97 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -29,7 +29,7 @@ ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;;; Code: diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 86a16036e10..e66c9655df1 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -44,7 +44,7 @@ ;; ;; New versions of IDLWAVE, documentation, and more information ;; available from: -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; INSTALLATION ;; ============ @@ -64,7 +64,7 @@ ;; The newest version of this file is available from the maintainer's ;; Webpage: ;; -;; http://idlwave.org +;; http://github.com/jdtsmith/idlwave ;; ;; DOCUMENTATION ;; ============= @@ -179,7 +179,7 @@ "Major mode for editing IDL .pro files." :tag "IDLWAVE" :link '(url-link :tag "Home Page" - "http://idlwave.org") + "http://github.com/jdtsmith/idlwave") :link '(emacs-commentary-link :tag "Commentary in idlw-shell.el" "idlw-shell.el") :link '(emacs-commentary-link :tag "Commentary in idlwave.el" "idlwave.el") @@ -1878,7 +1878,8 @@ The main features of this mode are Info documentation for this package is available. Use \\[idlwave-info] to display (complain to your sysadmin if that does not work). For Postscript, PDF, and HTML versions of the - documentation, check IDLWAVE's homepage at URL `http://idlwave.org'. + documentation, check IDLWAVE's homepage at URL + `http://github.com/jdtsmith/idlwave'. IDLWAVE has customize support - see the group `idlwave'. 10.Keybindings diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index cedc2986eda..f32d4641af0 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -26,8 +26,8 @@ ;; ===== ;; Emacs should enter Pascal mode when you find a Pascal source file. -;; When you have entered Pascal mode, you may get more info by pressing -;; C-h m. You may also get online help describing various functions by: +;; When you have entered Pascal mode, you can get more info by pressing +;; C-h m. You can also get help describing various functions by: ;; C-h f <Name of function you want described> ;; If you want to customize Pascal mode to fit you better, you may add diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 743981b3714..065a182904f 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1096,16 +1096,28 @@ the line will be re-indented automatically if needed." (when (and electric-indent-mode (eq (char-before) last-command-event)) (cond - ((and (not (bolp)) - (memq (char-after) '(?\) ?\] ?\}))) + ;; Electric indent inside parens + ((and + (not (bolp)) + (let ((paren-start (python-syntax-context 'paren))) + ;; Check that point is inside parens. + (when paren-start + (not + ;; Filter the case where input is happening in the same + ;; line where the open paren is. + (= (line-number-at-pos) + (line-number-at-pos paren-start))))) + ;; When content has been added before the closing paren or a + ;; comma has been inserted, it's ok to do the trick. + (or + (memq (char-after) '(?\) ?\] ?\})) + (eq (char-before) ?,))) (save-excursion (goto-char (line-beginning-position)) - ;; If after going to the beginning of line the point - ;; is still inside a paren it's ok to do the trick - (when (python-syntax-context 'paren) - (let ((indentation (python-indent-calculate-indentation))) - (when (< (current-indentation) indentation) - (indent-line-to indentation)))))) + (let ((indentation (python-indent-calculate-indentation))) + (when (< (current-indentation) indentation) + (indent-line-to indentation))))) + ;; Electric colon ((and (eq ?: last-command-event) (memq ?: electric-indent-chars) (not current-prefix-arg) diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 92a2e0b38cd..db0694549e1 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -325,8 +325,6 @@ ;; Emacs (property-change from) (overlay-change from) - (save-buffer-invisibility-spec buffer-invisibility-spec) - (buffer-invisibility-spec nil) before-string after-string) (while (< from to) (and (< property-change to) ; Don't search for property change diff --git a/lisp/rect.el b/lisp/rect.el index ac861a0824b..a2f8e4f6371 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -719,7 +719,7 @@ Ignores `line-move-visual'." ((not rectangle-mark-mode) (funcall orig start end window rol)) (rectangle--inhibit-region-highlight - (rectangle--unhighlight-for-redisplay orig rol) + (funcall redisplay-unhighlight-region-function rol) nil) ((and (eq 'rectangle (car-safe rol)) (eq (nth 1 rol) (buffer-chars-modified-tick)) diff --git a/lisp/simple.el b/lisp/simple.el index a8689aaf2e3..6fd50197a10 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4527,9 +4527,11 @@ run `deactivate-mark-hook'." (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). (cond ((eq (car-safe transient-mark-mode) 'only) - (setq transient-mark-mode (cdr transient-mark-mode))) + (setq transient-mark-mode (cdr transient-mark-mode)) + (if (eq transient-mark-mode (default-value 'transient-mark-mode)) + (kill-local-variable 'transient-mark-mode))) ((eq transient-mark-mode 'lambda) - (setq transient-mark-mode nil))) + (kill-local-variable 'transient-mark-mode))) (setq mark-active nil) (run-hooks 'deactivate-mark-hook) (redisplay--update-region-highlight (selected-window)))) @@ -4756,7 +4758,7 @@ Novice Emacs Lisp programmers often try to use the mark for the wrong purposes. See the documentation of `set-mark' for more information." (interactive "P") (cond ((eq transient-mark-mode 'lambda) - (setq transient-mark-mode nil)) + (kill-local-variable 'transient-mark-mode)) ((eq (car-safe transient-mark-mode) 'only) (deactivate-mark))) (cond @@ -4894,6 +4896,8 @@ its earlier value." (push-mark nil nil t))) ((eq (car-safe transient-mark-mode) 'only) (setq transient-mark-mode (cdr transient-mark-mode)) + (if (eq transient-mark-mode (default-value 'transient-mark-mode)) + (kill-local-variable 'transient-mark-mode)) (deactivate-mark)))) (define-minor-mode transient-mark-mode diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 9837c20b84d..56ff13fbbb6 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -140,7 +140,7 @@ Useful commands (type ? to hide them and free up screen): uh/um:\tunmark all sessions marked for hiding/operation n,SPC:\tnext session p,DEL:\tprevious session - E:\tbrowse Ediff on-line manual + E:\tbrowse Ediff manual T:\ttoggle truncation of long file names q:\tquit this session group ") @@ -1464,7 +1464,7 @@ Useful commands: R in any Ediff session: display session registry n,SPC: next session p,DEL: previous session - E: browse Ediff on-line manual + E: browse Ediff manual q: bury registry diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index d1332351a74..bb6ab1062c1 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -735,7 +735,7 @@ The second problem might be due to an incompatibility among these settings: ediff-patch-program = %S ediff-patch-options = %S ediff-backup-extension = %S ediff-backup-specs = %S -See Ediff on-line manual for more details on these variables. +See Ediff manual for more details on these variables. In particular, check the documentation for `ediff-backup-specs'. In any of the above cases, Ediff doesn't compare files automatically. diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 927a3ba7fb6..5418039143f 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -64,7 +64,7 @@ ;; compressed files. Details are given below. ;; Finally, Ediff supports directory-level comparison, merging and patching. -;; See the on-line manual for details. +;; See the Ediff manual for details. ;; This package builds upon the ideas borrowed from emerge.el and several ;; Ediff's functions are adaptations from emerge.el. Much of the functionality diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index e6bd897f4ac..1d75411ec1f 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -132,6 +132,8 @@ This applies when its SETUP argument is non-nil." log-edit-insert-changelog log-edit-show-files) "Hook run at the end of `log-edit'." + ;; Added log-edit-insert-message-template, moved log-edit-show-files. + :version "24.4" :group 'log-edit :type '(hook :options (log-edit-insert-message-template log-edit-insert-cvs-rcstemplate @@ -355,9 +357,15 @@ The first subexpression is the actual text of the field.") (set-match-data (list start (point))) (point)))) +(defun log-edit-goto-eoh () ;FIXME: Almost rfc822-goto-eoh! + (goto-char (point-min)) + (when (re-search-forward + "^\\([^[:alpha:]]\\|[[:alnum:]-]+[^[:alnum:]-:]\\)" nil 'move) + (goto-char (match-beginning 0)))) + (defun log-edit--match-first-line (limit) (let ((start (point))) - (rfc822-goto-eoh) + (log-edit-goto-eoh) (skip-chars-forward "\n") (and (< start (line-end-position)) (< (point) limit) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index c7cae8359bf..9c8ab3ba393 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -674,7 +674,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (cl-flet ((boolean-arg-fn (argument) (lambda (value) (when (equal value "yes") (list argument))))) - ;; When operating on the whole tree, better pass nil than ".", since "." + ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. (apply 'vc-git-command nil 0 (if only files) (nconc (list "commit" "-m") @@ -684,7 +684,7 @@ It is based on `log-edit-mode', and has Git-specific extensions.") ("Amend" . ,(boolean-arg-fn "--amend")) ("Sign-Off" . ,(boolean-arg-fn "--signoff"))) comment) - (if only (list "--only" "--"))))))) + (if only (list "--only" "--") '("-a"))))))) (defun vc-git-find-revision (file rev buffer) (let* (process-file-side-effects diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index f9e89880dae..e5e77405b02 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -312,7 +312,8 @@ terminals that support it.") "Enable xterm mouse tracking on TERMINAL." (when (and xterm-mouse-mode (eq t (terminal-live-p terminal)) ;; Avoid the initial terminal which is not a termcap device. - ;; FIXME: is there more elegant way to detect the initial terminal? + ;; FIXME: is there more elegant way to detect the initial + ;; terminal? (not (string= (terminal-name terminal) "initial_terminal"))) (unless (terminal-parameter terminal 'xterm-mouse-mode) ;; Simulate selecting a terminal by selecting one of its frames @@ -320,7 +321,13 @@ terminals that support it.") (with-selected-frame (car (frames-on-display-list terminal)) (define-key input-decode-map "\e[M" 'xterm-mouse-translate) (define-key input-decode-map "\e[<" 'xterm-mouse-translate-extended)) - (send-string-to-terminal xterm-mouse-tracking-enable-sequence terminal) + (condition-case err + (send-string-to-terminal xterm-mouse-tracking-enable-sequence + terminal) + ;; FIXME: This should use a dedicated error signal. + (error (if (equal (cadr err) "Terminal is currently suspended") + nil ;The sequence will be sent upon resume. + (signal (car err) (cdr err))))) (push xterm-mouse-tracking-enable-sequence (terminal-parameter nil 'tty-mode-set-strings)) (push xterm-mouse-tracking-disable-sequence @@ -338,7 +345,13 @@ terminals that support it.") ;; command too many times (or to catch an unintended key sequence), than ;; to send it too few times (or to fail to let xterm-mouse events ;; pass by untranslated). - (send-string-to-terminal xterm-mouse-tracking-disable-sequence terminal) + (condition-case err + (send-string-to-terminal xterm-mouse-tracking-disable-sequence + terminal) + ;; FIXME: This should use a dedicated error signal. + (error (if (equal (cadr err) "Terminal is currently suspended") + nil + (signal (car err) (cdr err))))) (setf (terminal-parameter nil 'tty-mode-set-strings) (remq xterm-mouse-tracking-enable-sequence (terminal-parameter nil 'tty-mode-set-strings))) |
