commit 4ad6be65f68a5c875ecbaa9e66d8ced28f43670a (HEAD, refs/remotes/origin/master) Author: Fran Litterio Date: Mon Apr 17 20:30:40 2017 -0400 Small erc-kill-channel fix (bug#23700) * lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 488404d734..7e19ebbf98 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -6735,9 +6735,10 @@ This function should be on `erc-kill-server-hook'." This function should be on `erc-kill-channel-hook'." (when (erc-server-process-alive) (let ((tgt (erc-default-target))) - (erc-server-send (format "PART %s :%s" tgt - (funcall erc-part-reason nil)) - nil tgt)))) + (if tgt + (erc-server-send (format "PART %s :%s" tgt + (funcall erc-part-reason nil)) + nil tgt))))) ;;; Dealing with `erc-parsed' commit 2d42bf7f5e57001a836b7b4e6303fac9d3f00a1d Author: Glenn Morris Date: Mon Apr 17 20:16:15 2017 -0400 ediff: use user-error rather than debug-ignored-errors * lisp/vc/ediff-diff.el (ediff-prepare-error-list): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): * lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer) (ediff-check-version): * lisp/vc/ediff-merg.el (ediff-shrink-window-C): * lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs) (ediff-append-custom-diff, ediff-meta-show-patch) (ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry) (ediff-get-meta-info, ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-patch-file-internal): * lisp/vc/ediff-util.el (ediff-toggle-autorefine) (ediff--check-ancestor-exists, ediff-toggle-read-only) (ediff-toggle-wide-display, ediff-toggle-multiframe) (ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only) (ediff-next-difference, ediff-previous-difference) (ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer) (ediff-save-buffer): * lisp/vc/ediff-wind.el (ediff-make-wide-display): * lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal) (ediff-directories-internal, ediff-directory-revisions-internal) (ediff-regions-wordwise, ediff-regions-linewise) (ediff-load-version-control): Use user-error. (debug-ignored-errors): No longer modify. diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index ded82c41c9..b957bdce4f 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -340,7 +340,7 @@ one optional arguments, diff-number to refine.") (ediff-skip-unsuitable-frames) (switch-to-buffer error-buf) (ediff-kill-buffer-carefully ctl-buf) - (error "Errors in diff output. Diff output is in %S" diff-buff)))) + (user-error "Errors in diff output. Diff output is in %S" diff-buff)))) ;; BOUNDS specifies visibility bounds to use. ;; WORD-MODE tells whether we are in the word-mode or not. diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el index 52a4825207..339d3a513b 100644 --- a/lisp/vc/ediff-help.el +++ b/lisp/vc/ediff-help.el @@ -190,7 +190,7 @@ the value of this variable and the variables `ediff-help-message-*' in (overlays-at pos))))) (if (not (stringp cmd)) - (error "Hmm... I don't see an Ediff command around here...")) + (user-error "Hmm... I don't see an Ediff command around here...")) (ediff-documentation "Quick Help Commands") @@ -236,7 +236,7 @@ the value of this variable and the variables `ediff-help-message-*' in ((string= cmd "s") (re-search-forward "^['`‘]s['’]")) ((string= cmd "+") (re-search-forward "^['`‘]\\+['’]")) ((string= cmd "=") (re-search-forward "^['`‘]=['’]")) - (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) + (t (user-error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) ) ; let case-fold-search )) diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index e054268859..59d97c3cea 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el @@ -385,8 +385,8 @@ It needs to be killed when we quit the session.") (defsubst ediff-barf-if-not-control-buffer (&optional meta-buf-p) (or (ediff-in-control-buffer-p meta-buf-p) - (error "%S: This command runs in Ediff Control Buffer only!" - this-command))) + (user-error "%S: This command runs in Ediff Control Buffer only!" + this-command))) (defgroup ediff-highlighting nil "Highlighting of difference regions in Ediff." @@ -758,7 +758,7 @@ TYPE-OF-EMACS is either `emacs' or `xemacs'." (funcall op emacs-minor-version minor) t))) (t - (error "%S: Invalid op in ediff-check-version" op))))) + (user-error "%S: Invalid op in ediff-check-version" op))))) (defun ediff-color-display-p () (condition-case nil diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el index d7fa74fff8..d91d04467e 100644 --- a/lisp/vc/ediff-merg.el +++ b/lisp/vc/ediff-merg.el @@ -281,7 +281,7 @@ With a prefix argument, returns window C to its normal size. Used only for merging jobs." (interactive "P") (if (not ediff-merge-job) - (error "ediff-shrink-window-C can be used only for merging jobs")) + (user-error "ediff-shrink-window-C can be used only for merging jobs")) (cond ((eq arg '-) (setq arg -1)) ((not (numberp arg)) (setq arg nil))) (cond ((null arg) diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 41015f704d..5bf94a5635 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -1242,7 +1242,7 @@ behavior." (insert "\n"))) (defun ediff-draw-dir-diffs (diff-list &optional buf-name) - (if (null diff-list) (error "Lost difference info on these directories")) + (if (null diff-list) (user-error "Lost difference info on these directories")) (setq buf-name (or buf-name (ediff-unique-buffer-name "*Ediff File Group Differences" "*"))) @@ -1360,7 +1360,7 @@ Useful commands: "Display differences among the directories involved in session group." (interactive) (if (ediff-one-filegroup-metajob) - (error "This command is inapplicable in the present context")) + (user-error "This command is inapplicable in the present context")) (or (ediff-buffer-live-p ediff-dir-diffs-buffer) (ediff-draw-dir-diffs ediff-dir-difference-list)) (let ((buf ediff-dir-diffs-buffer)) @@ -1441,7 +1441,7 @@ Useful commands: (if (ediff-buffer-live-p ediff-parent-meta-buffer) (ediff-show-meta-buffer ediff-parent-meta-buffer ediff-meta-session-number) - (error "This session group has no parent"))) + (user-error "This session group has no parent"))) ;; argument is ignored @@ -1592,7 +1592,7 @@ Useful commands: (cond (ignore) (unmark (ediff-set-session-status info nil)) ;;; (if (ediff-buffer-live-p session-buf) -;;; (error "Can't hide active session, %s" (buffer-name session-buf))) +;;; (user-error "Can't hide active session, %s" (buffer-name session-buf))) (t (ediff-set-session-status info ?H)))) unmark) @@ -1707,7 +1707,7 @@ Useful commands: (setq custom-diff-buf ediff-custom-diff-buffer))))) (or (ediff-buffer-live-p meta-diff-buff) - (error "Ediff: something wrong--killed multiple diff's buffer")) + (user-error "Ediff: something wrong--killed multiple diff's buffer")) (cond ((ediff-buffer-live-p custom-diff-buf) ;; for live session buffers we do them first because the user may @@ -1740,7 +1740,7 @@ Useful commands: (insert "\n"))) (t (ediff-kill-buffer-carefully meta-diff-buff) - (error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) + (user-error "Session %d compares versions of file. Such session must be active to enable multifile patch collection" sessionNum ))) )) (defun ediff-collect-custom-diffs () @@ -1792,7 +1792,7 @@ all marked sessions must be active." (goto-char (point-min)) (display-buffer ediff-tmp-buffer 'not-this-window) )) - (error "The patch buffer wasn't found")))) + (user-error "The patch buffer wasn't found")))) (declare-function ediff-directories-internal "ediff" (dir1 dir2 dir3 regexp action jobname @@ -1829,7 +1829,7 @@ all marked sessions must be active." (progn (ediff-set-session-status info nil) (ediff-update-meta-buffer meta-buf nil session-number)) - (error "Aborted")))) + (user-error "Aborted")))) (ediff-with-current-buffer meta-buf (setq merge-autostore-dir @@ -1927,7 +1927,7 @@ all marked sessions must be active." ;; level; see below (setcar (quote ,info) ediff-control-buffer)))) - (error "Aborted"))) + (user-error "Aborted"))) ((ediff-one-filegroup-metajob) ; needs 1 file arg (funcall ediff-session-action-function file1 @@ -2057,7 +2057,7 @@ all marked sessions must be active." (setq meta-buf (or meta-buf ediff-meta-buffer)) (cond ((not (bufferp meta-buf)) - (error "This Ediff session is not part of a session group")) + (user-error "This Ediff session is not part of a session group")) ((not (ediff-buffer-live-p meta-buf)) (error "Can't find this session's group panel -- session itself is ok"))) @@ -2127,7 +2127,7 @@ all marked sessions must be active." (interactive) (ediff-update-registry) (if (not (ediff-buffer-live-p ediff-registry-buffer)) - (error "No active Ediff sessions or corrupted session registry")) + (user-error "No active Ediff sessions or corrupted session registry")) (let (wind frame) ;; for some reason, point moves in ediff-registry-buffer, so we preserve it ;; explicitly @@ -2299,7 +2299,7 @@ If this is a session registry buffer then just bury it." (or result (unless noerror (ediff-update-registry) - (error "No session info in this line"))))) + (user-error "No session info in this line"))))) (defun ediff-get-meta-overlay-at-pos (point) @@ -2380,7 +2380,7 @@ If this is a session registry buffer then just bury it." session-buf beg-marker end-marker) (if (or (file-directory-p file) (string-match "/dev/null" file)) - (error "`%s' is not an ordinary file" (file-name-as-directory file))) + (user-error "`%s' is not an ordinary file" (file-name-as-directory file))) (setq session-buf (ediff-get-session-buffer info) beg-marker (ediff-get-session-objB-name info) end-marker (ediff-get-session-objC-name info)) diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 36aebf4aed..0340672da2 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -766,7 +766,7 @@ you can still examine the changes via M-x ediff-files" (select-window aux-wind) (goto-char (point-max)))) (switch-to-buffer-other-window patch-diagnostics) - (error "Patch appears to have failed"))) + (user-error "Patch appears to have failed"))) ;; If black magic is involved, apply patch to a temp copy of the ;; file. Otherwise, apply patch to the orig copy. If patch is applied diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index aea5f76d4f..bcf446a64c 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -939,7 +939,7 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting." (interactive) (ediff-barf-if-not-control-buffer) (if ediff-word-mode - (error "No fine differences in this mode")) + (user-error "No fine differences in this mode")) (cond ((eq ediff-auto-refine 'nix) (setq ediff-auto-refine 'on) (ediff-make-fine-diffs ediff-current-difference 'noforce) @@ -956,9 +956,9 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting." (defun ediff--check-ancestor-exists () (or (ediff-buffer-live-p ediff-ancestor-buffer) (if ediff-merge-with-ancestor-job - (error "Lost connection to ancestor buffer. This shouldn't happen. \ + (user-error "Lost connection to ancestor buffer. This shouldn't happen. \ Please report this bug to bug-gnu-emacs@gnu.org") - (error "Not merging with ancestor")))) + (user-error "Not merging with ancestor")))) ;; Restore `ediff-show-ancestor' on exit. (defun ediff--restore-options-on-exit () @@ -1080,7 +1080,7 @@ of the current buffer." (save-window-excursion (select-window (ediff-get-visible-buffer-window buf)) (command-execute toggle-ro-cmd))) - (error "Don't know how to toggle read-only in buffer %S" buf)) + (user-error "Don't know how to toggle read-only in buffer %S" buf)) ;; Check if we made the current buffer updatable, but its file is RO. ;; Signal a warning in this case. @@ -1270,7 +1270,7 @@ This is especially useful when comparing buffers side-by-side." (interactive) (ediff-barf-if-not-control-buffer) (or (ediff-window-display-p) - (error "%sEmacs is not running as a window application" + (user-error "%sEmacs is not running as a window application" (if (featurep 'emacs) "" "X"))) (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows (let ((ctl-buf ediff-control-buffer)) @@ -1300,7 +1300,7 @@ which see." (interactive) (let (window-setup-func) (or (ediff-window-display-p) - (error "%sEmacs is not running as a window application" + (user-error "%sEmacs is not running as a window application" (if (featurep 'emacs) "" "X"))) (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe) @@ -1346,7 +1346,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." (if (featurep 'ediff-tbar) (progn (or (ediff-window-display-p) - (error "%sEmacs is not running as a window application" + (user-error "%sEmacs is not running as a window application" (if (featurep 'emacs) "" "X"))) (if (ediff-use-toolbar-p) (ediff-kill-bottom-toolbar)) @@ -1401,7 +1401,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." (interactive) (ediff-barf-if-not-control-buffer) (if (not ediff-merge-with-ancestor-job) - (error "This command makes sense only when merging with an ancestor")) + (user-error "This command makes sense only when merging with an ancestor")) (setq ediff-show-clashes-only (not ediff-show-clashes-only)) (if ediff-show-clashes-only (message "Focus on regions where both buffers differ from the ancestor") @@ -1793,7 +1793,7 @@ With a prefix argument, go forward that many differences." (ediff-unselect-and-select-difference n) ) ; let (ediff-visible-region) - (error "At end of the difference list"))) + (user-error "At end of the difference list"))) (defun ediff-previous-difference (&optional arg) "Go to the previous difference. @@ -1842,7 +1842,7 @@ With a prefix argument, go back that many differences." (ediff-unselect-and-select-difference n) ) ; let (ediff-visible-region) - (error "At beginning of the difference list"))) + (user-error "At beginning of the difference list"))) ;; The diff number is as perceived by the user (i.e., 1+ the internal ;; representation) @@ -2161,7 +2161,7 @@ ARG is a prefix argument. If nil, copy the current difference region." (if (cdr saved-rec) (setq saved-diff (cdr saved-rec)) (if (> ediff-number-of-differences 0) - (error "Nothing saved for diff %d in buffer %S" (1+ n) buf-type) + (user-error "Nothing saved for diff %d in buffer %S" (1+ n) buf-type) (error ediff-NO-DIFFERENCES))) (setq reg-beg (ediff-get-diff-posn buf-type 'beg n ediff-control-buffer)) @@ -3200,7 +3200,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (setq f (expand-file-name (file-name-nondirectory default-file) f))) (if (and no-dirs (file-directory-p f)) - (error "File %s is a directory" f)) + (user-error "File %s is a directory" f)) f)) ;; If PREFIX is given, then it is used as a prefix for the temp file @@ -3307,7 +3307,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (error (beep) (message "Couldn't save %s" buffer-file-name))) - (error "Buffer is out of sync for file %s" buffer-file-name)) + (user-error "Buffer is out of sync for file %s" buffer-file-name)) ;; If buffer is not obsolete and is not modified, do nothing nil) ;; If buffer is obsolete, offer to revert @@ -3320,7 +3320,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." (if file-magic (erase-buffer)) (revert-buffer t t)) - (error "Buffer out of sync for file %s" buffer-file-name)))) + (user-error "Buffer out of sync for file %s" buffer-file-name)))) ;; if there is another buffer visiting the file of the merge buffer, offer to ;; save and delete the buffer; else bark @@ -3375,7 +3375,7 @@ Without an argument, it saves customized diff argument, if available ediff-custom-diff-buffer) ((ediff-buffer-live-p ediff-diff-buffer) ediff-diff-buffer) - (t (error "Output from `diff' not found")))) + (t (user-error "Output from `diff' not found")))) ) (let ((window-min-height 2)) (save-buffer)))) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index 9b3d53fca7..31dcf3b69f 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -1184,7 +1184,7 @@ The frame to be resized is kept in `ediff-wide-display-frame'. This function modifies only the left margin and the width of the display. It assumes that it is called from within the control buffer." (if (not (fboundp 'ediff-display-pixel-width)) - (error "Can't determine display width")) + (user-error "Can't determine display width")) (let* ((frame-A (window-frame ediff-window-A)) (frame-A-params (frame-parameters frame-A)) (cw (ediff-frame-char-width frame-A)) diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el index 07c5ceadc6..4751bb6ddc 100644 --- a/lisp/vc/ediff.el +++ b/lisp/vc/ediff.el @@ -289,9 +289,9 @@ deleted." (file-magic (ediff-filename-magic-p file)) (temp-file-name-prefix (file-name-nondirectory file))) (cond ((not (file-readable-p file)) - (error "File `%s' does not exist or is not readable" file)) + (user-error "File `%s' does not exist or is not readable" file)) ((file-directory-p file) - (error "File `%s' is a directory" file))) + (user-error "File `%s' is a directory" file))) ;; some of the commands, below, require full file name (setq file (expand-file-name file)) @@ -481,13 +481,13 @@ If this file is a backup, `ediff' it with its original." (unwind-protect (progn (if (not (ediff-buffer-live-p buf-A)) - (error "Buffer %S doesn't exist" buf-A)) + (user-error "Buffer %S doesn't exist" buf-A)) (if (not (ediff-buffer-live-p buf-B)) - (error "Buffer %S doesn't exist" buf-B)) + (user-error "Buffer %S doesn't exist" buf-B)) (let ((ediff-job-name job-name)) (if (and ediff-3way-comparison-job (not buf-C-is-alive)) - (error "Buffer %S doesn't exist" buf-C))) + (user-error "Buffer %S doesn't exist" buf-C))) (if (stringp buf-A-file-name) (setq buf-A-file-name (file-name-nondirectory buf-A-file-name))) (if (stringp buf-B-file-name) @@ -784,13 +784,13 @@ names. Only the files that are under revision control are taken into account." (setq dir3 (if (file-directory-p dir3) dir3 (file-name-directory dir3)))) (cond ((string= dir1 dir2) - (error "Directories A and B are the same: %s" dir1)) + (user-error "Directories A and B are the same: %s" dir1)) ((and (eq jobname 'ediff-directories3) (string= dir1 dir3)) - (error "Directories A and C are the same: %s" dir1)) + (user-error "Directories A and C are the same: %s" dir1)) ((and (eq jobname 'ediff-directories3) (string= dir2 dir3)) - (error "Directories B and C are the same: %s" dir1))) + (user-error "Directories B and C are the same: %s" dir1))) (if merge-autostore-dir (or (stringp merge-autostore-dir) @@ -816,15 +816,15 @@ names. Only the files that are under revision control are taken into account." (cond ((and (stringp dir1) (string= merge-autostore-dir dir1)) (or (y-or-n-p "Directory for saving merged files = Directory A. Sure? ") - (error "Directory merge aborted"))) + (user-error "Directory merge aborted"))) ((and (stringp dir2) (string= merge-autostore-dir dir2)) (or (y-or-n-p "Directory for saving merged files = Directory B. Sure? ") - (error "Directory merge aborted"))) + (user-error "Directory merge aborted"))) ((and (stringp dir3) (string= merge-autostore-dir dir3)) (or (y-or-n-p "Directory for saving merged files = Ancestor Directory. Sure? ") - (error "Directory merge aborted"))))) + (user-error "Directory merge aborted"))))) (setq dir-diff-struct (ediff-intersect-directories jobname @@ -877,7 +877,7 @@ names. Only the files that are under revision control are taken into account." (string= merge-autostore-dir dir1)) (or (y-or-n-p "Directory for saving merged file = directory A. Sure? ") - (error "Merge of directory revisions aborted"))) + (user-error "Merge of directory revisions aborted"))) (setq file-list (ediff-get-directory-files-under-revision @@ -978,9 +978,9 @@ lines. For large regions, use `ediff-regions-linewise'." (ediff-other-buffer bf)) t)))) (if (not (ediff-buffer-live-p buffer-A)) - (error "Buffer %S doesn't exist" buffer-A)) + (user-error "Buffer %S doesn't exist" buffer-A)) (if (not (ediff-buffer-live-p buffer-B)) - (error "Buffer %S doesn't exist" buffer-B)) + (user-error "Buffer %S doesn't exist" buffer-B)) (let ((buffer-A @@ -1019,9 +1019,9 @@ lines. For small regions, use `ediff-regions-wordwise'." (ediff-other-buffer bf)) t)))) (if (not (ediff-buffer-live-p buffer-A)) - (error "Buffer %S doesn't exist" buffer-A)) + (user-error "Buffer %S doesn't exist" buffer-A)) (if (not (ediff-buffer-live-p buffer-B)) - (error "Buffer %S doesn't exist" buffer-B)) + (user-error "Buffer %S doesn't exist" buffer-B)) (let ((buffer-A (ediff-clone-buffer-for-region-comparison buffer-A "-Region.A-")) @@ -1467,7 +1467,7 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'." (message "") ; kill the message from `locate-library' (require ediff-version-control-package)) (or silent - (error "Version control package %S.el not found. Use vc.el instead" + (user-error "Version control package %S.el not found. Use vc.el instead" ediff-version-control-package))))) @@ -1512,56 +1512,6 @@ With optional NODE, goes to that node." (select-window ctl-window) (set-window-buffer ctl-window ctl-buf))))))) - -(dolist (mess '("^Errors in diff output. Diff output is in " - "^Hmm... I don't see an Ediff command around here...$" - "^Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer$" - ": This command runs in Ediff Control Buffer only!$" - ": Invalid op in ediff-check-version$" - "^ediff-shrink-window-C can be used only for merging jobs$" - "^Lost difference info on these directories$" - "^This command is inapplicable in the present context$" - "^This session group has no parent$" - "^Can't hide active session, $" - "^Ediff: something wrong--no multiple diffs buffer$" - "^Can't make context diff for Session $" - "^The patch buffer wasn't found$" - "^Aborted$" - "^This Ediff session is not part of a session group$" - "^No active Ediff sessions or corrupted session registry$" - "^No session info in this line$" - "^`.*' is not an ordinary file$" - "^Patch appears to have failed$" - "^Recomputation of differences cancelled$" - "^No fine differences in this mode$" - "^Lost connection to ancestor buffer...sorry$" - "^Not merging with ancestor$" - "^Don't know how to toggle read-only in buffer " - "Emacs is not running as a window application$" - "^This command makes sense only when merging with an ancestor$" - "^At end of the difference list$" - "^At beginning of the difference list$" - "^Nothing saved for diff .* in buffer " - "^Buffer is out of sync for file " - "^Buffer out of sync for file " - "^Output from `diff' not found$" - "^You forgot to specify a region in buffer " - "^All right. Make up your mind and come back...$" - "^Current buffer is not visiting any file$" - "^Failed to retrieve revision: $" - "^Can't determine display width.$" - "^File `.*' does not exist or is not readable$" - "^File `.*' is a directory$" - "^Buffer .* doesn't exist$" - "^Directories . and . are the same: " - "^Directory merge aborted$" - "^Merge of directory revisions aborted$" - "^Buffer .* doesn't exist$" - "^There is no file to merge$" - "^Version control package .*.el not found. Use vc.el instead$")) - (add-to-list 'debug-ignored-errors mess)) - - ;;; Command line interface commit 2e3a33659fb85330ec76a67b2113472e7e0b546a Author: Glenn Morris Date: Mon Apr 17 20:10:28 2017 -0400 mh-e: use user-error rather than debug-ignored-errors * lisp/mh-e/mh-alias.el (mh-alias-grab-from-field): * lisp/mh-e/mh-utils.el (mh-get-msg-num): Use user-error. (debug-ignored-errors): No longer modify. diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index e2f747cf92..82602eecf2 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -589,7 +589,7 @@ filing messages." (set-buffer (get-buffer-create mh-temp-buffer)) (insert-file-contents (mh-msg-filename (mh-get-msg-num t)))) ((eq major-mode 'mh-folder-mode) - (error "Cursor not pointing to a message"))) + (user-error "Cursor not pointing to a message"))) (let* ((address (or (mh-extract-from-header-value) (error "Message has no From: header"))) (alias (mh-alias-suggest-alias address))) diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 3bc5fef51a..1ed2e0f871 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -349,11 +349,9 @@ the cursor is not pointing to a message." (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) (error-if-no-message - (error "Cursor not pointing to message")) + (user-error "Cursor not pointing to message")) (t nil)))) -(add-to-list 'debug-ignored-errors "^Cursor not pointing to message$") - ;;; Folder Cache and Access commit d0397f4a5764d3be93be3e3d35bccc1bf27522cf Author: Glenn Morris Date: Mon Apr 17 20:09:27 2017 -0400 ispell.el: use user-error rather than debug-ignored-errors * lisp/textmodes/ispell.el (ispell-get-word): Use user-error. (debug-ignored-errors): No longer modify. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index db733fe661..773023a34a 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -2014,7 +2014,7 @@ which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'." (if ispell-check-only ;; return dummy word when just flagging misspellings (list "" (point) (point)) - (error "No word found to check!")) + (user-error "No word found to check!")) (setq start (copy-marker (match-beginning 0)) end (point-marker) word (buffer-substring-no-properties start end)) @@ -4138,9 +4138,6 @@ Both should not be used to define a buffer-local dictionary." (insert comment-end))))) (insert (concat " " word)))))))) -;;FIXME: Use `user-error' instead! -(add-to-list 'debug-ignored-errors "^No word found to check!$") - (provide 'ispell) commit d5ead735a07e619e514dd10b9e84e5d788b8a5f0 Author: Paul Eggert Date: Mon Apr 17 11:22:34 2017 -0700 ; Spelling fix diff --git a/src/nsterm.m b/src/nsterm.m index 162980a651..4725991aff 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -8297,7 +8297,7 @@ - (void)mouseDown: (NSEvent *)e case NSScrollerKnobSlot: /* GNUstep-only */ last_hit_part = scroll_bar_move_ratio; break; default: /* NSScrollerNoPart? */ - fprintf (stderr, "EmacsScoller-mouseDown: unexpected part %ld\n", + fprintf (stderr, "EmacsScroller-mouseDown: unexpected part %ld\n", (long) part); return; } commit b8e0d203febffe7446cbc5e0ee7d9bf168854a88 Author: Paul Eggert Date: Mon Apr 17 11:13:56 2017 -0700 * src/xterm.c (x_fill_rectangle): Now static. diff --git a/src/xterm.c b/src/xterm.c index 5169292170..3de1ffea90 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -714,7 +714,7 @@ x_reset_clip_rectangles (struct frame *f, GC gc) #endif } -void +static void x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height) { #ifdef USE_CAIRO diff --git a/src/xterm.h b/src/xterm.h index 3122a2b208..a75257006f 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -1102,7 +1102,6 @@ extern bool x_alloc_lighter_color_for_widget (Widget, Display *, Colormap, extern bool x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (struct frame *f, int, int, int, int); -extern void x_fill_rectangle (struct frame *f, GC, int, int, int, int); #if !defined USE_X_TOOLKIT && !defined USE_GTK extern void x_mouse_leave (struct x_display_info *); #endif commit 932698b7891668318ba9ca93375d8d27d52a07f5 Author: Paul Eggert Date: Mon Apr 17 10:19:39 2017 -0700 Tighten recently-added UTF-8 check * src/coding.c (encode_coding_utf_8): Now extern. * src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]: Check for UTF-8, not just for multibyte. diff --git a/src/coding.c b/src/coding.c index e341a71f57..367a975984 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1449,7 +1449,7 @@ decode_coding_utf_8 (struct coding_system *coding) } -static bool +bool encode_coding_utf_8 (struct coding_system *coding) { bool multibytep = coding->dst_multibyte; diff --git a/src/coding.h b/src/coding.h index 77f90ec9c1..8ed851d99f 100644 --- a/src/coding.h +++ b/src/coding.h @@ -664,6 +664,7 @@ struct coding_system /* Extern declarations. */ extern Lisp_Object code_conversion_save (bool, bool); +extern bool encode_coding_utf_8 (struct coding_system *); extern void setup_coding_system (Lisp_Object, struct coding_system *); extern Lisp_Object coding_charset_list (struct coding_system *); extern Lisp_Object coding_system_charset_list (Lisp_Object); diff --git a/src/terminal.c b/src/terminal.c index 3d25b36fa5..367f2ac719 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -576,8 +576,9 @@ terminal_glyph_code (struct terminal *t, int ch) { #if HAVE_STRUCT_UNIPAIR_UNICODE /* Heuristically assume that a terminal supporting glyph codes is in - UTF-8 mode if and only if its coding system is multibyte (Bug#26396). */ - if (t->type == output_termcap && t->terminal_coding->src_multibyte) + UTF-8 mode if and only if its coding system is UTF-8 (Bug#26396). */ + if (t->type == output_termcap + && t->terminal_coding->encoder == encode_coding_utf_8) { /* As a hack, recompute the table when CH is the maximum character. */ commit 09eaf661eb6ea49c6324d8819a872c523133dc2b Author: David Engster Date: Mon Apr 17 16:52:08 2017 +0200 xml: Properly handle symbol-qnames for attribute parsing * lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from xml-ns argument (reverts aea67018) (Bug#26533). (xml-maybe-do-ns): Properly handle default namespace by not interning new symbol when 'special' flag is set. * tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames) (xml-parse-namespace-attribute-qnames): Add test for Bug#26533. diff --git a/lisp/xml.el b/lisp/xml.el index be2ac96f26..88dc70bc41 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -437,6 +437,7 @@ in the XML-NS argument." (if symbol-qnames (cdr xml-ns) xml-ns))) ""))) (if (and symbol-qnames + (not special) (not (string= prefix "xmlns"))) (intern (concat ns lname)) (cons ns (if special "" lname)))) @@ -646,10 +647,8 @@ surpassed `xml-entity-expansion-limit'")))) (defun xml-parse-attlist (&optional xml-ns) "Return the attribute-list after point. Leave point at the first non-blank character after the tag." - (let* ((attlist ()) - (symbol-qnames (eq (car-safe xml-ns) 'symbol-qnames)) - (xml-ns (if symbol-qnames (cdr xml-ns) xml-ns)) - end-pos name) + (let ((attlist ()) + end-pos name) (skip-syntax-forward " ") (while (looking-at (eval-when-compile (concat "\\(" xml-name-re "\\)\\s-*=\\s-*"))) diff --git a/test/lisp/xml-tests.el b/test/lisp/xml-tests.el index d0da2094db..16945b0f92 100644 --- a/test/lisp/xml-tests.el +++ b/test/lisp/xml-tests.el @@ -149,6 +149,21 @@ Parser is called with and without 'symbol-qnames argument.") (should (equal (cdr xml-parse-test--default-namespace-qnames) (xml-parse-region nil nil nil nil 'symbol-qnames))))) +;; Test bug #26533 (proper expansion in prefixed attributes with 'symbol-qnames) +(defvar xml-parse-test--namespace-attribute-qnames + (cons "" + '((something + ((("http://www.w3.org/2000/xmlns/" . "a") + . "myns:")) + (whatever + ((myns:b . "c"))))))) + +(ert-deftest xml-parse-namespace-attribute-qnames () + (with-temp-buffer + (insert (car xml-parse-test--namespace-attribute-qnames)) + (should (equal (cdr xml-parse-test--namespace-attribute-qnames) + (xml-parse-region nil nil nil nil 'symbol-qnames))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: commit 630df0587e1069b2cd2f2536d5fb61175adac3a2 Author: Paul Eggert Date: Mon Apr 17 07:56:08 2017 -0700 * src/lisp.h (STRING_SET_CHARS): Simplify assertion. diff --git a/src/lisp.h b/src/lisp.h index e0bad58f75..daf57ed906 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1371,8 +1371,9 @@ STRING_SET_CHARS (Lisp_Object string, ptrdiff_t newsize) { /* This function cannot change the size of data allocated for the string when it was created. */ - eassert ((STRING_MULTIBYTE (string) && newsize <= SBYTES (string)) - || (!STRING_MULTIBYTE (string) && newsize == SCHARS (string))); + eassert (STRING_MULTIBYTE (string) + ? newsize <= SBYTES (string) + : newsize == SCHARS (string)); XSTRING (string)->size = newsize; }