commit c542fab20f53374dd0c71dce949ef370fc76fa48 (HEAD, refs/remotes/origin/master) Author: Mark Oteiza Date: Tue Nov 22 11:09:15 2016 -0500 ; Fix previous change strlen is already computed, just use the symbol. * lisp/ibuffer.el (ibuffer-compile-make-eliding-form): Use strlen. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index dc5681c..51d7cb9 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1571,7 +1571,7 @@ If point is on a group name, this function operates on that group." (defun ibuffer-compile-make-substring-form (strvar maxvar from-end-p) (if from-end-p ;; FIXME: not sure if this case is correct (Bug#24972) - `(truncate-string-to-width str (string-width str) (- strlen ,maxvar) nil ?\s) + `(truncate-string-to-width str strlen (- strlen ,maxvar) nil ?\s) `(truncate-string-to-width ,strvar ,maxvar nil ?\s))) (defun ibuffer-compile-make-format-form (strvar widthform alignment) commit afe2997119a5e6b108851f2e236037da1d4acef2 Author: Philipp Stephani Date: Thu Oct 27 00:28:34 2016 +0200 Comint: new user option for C-c M-r and C-c M-s This option allows the user to specify where to place point after these commands. * comint.el (comint-move-point-for-matching-input): New user option. (comint-previous-matching-input-from-input): Use user option. diff --git a/etc/NEWS b/etc/NEWS index 02e93e4..a65e262 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -337,6 +337,12 @@ whose content matches a regexp; bound to '% g'. *** Support for opening links to man pages in Man or WoMan mode. +** Comint + +--- +*** New user option 'comint-move-point-for-matching-input' to control +where to place point after C-c M-r and C-c M-s. + ** Compilation mode --- diff --git a/lisp/comint.el b/lisp/comint.el index 919265f..b9c65b0 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -283,6 +283,17 @@ This variable is buffer-local in all Comint buffers." (const others)) :group 'comint) +(defcustom comint-move-point-for-matching-input 'after-input + "Controls where to place point after matching input. +\\This influences the commands \\[comint-previous-matching-input-from-input] and \\[comint-next-matching-input-from-input]. +If `after-input', point will be positioned after the input typed +by the user, but before the rest of the history entry that has +been inserted. If `end-of-line', point will be positioned at the +end of the current logical (not visual) line after insertion." + :type '(radio (const :tag "Stay after input" after-input) + (const :tag "Move to end of line" end-of-line)) + :group 'comint) + (defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output) (defcustom comint-scroll-show-maximum-output t @@ -1222,7 +1233,8 @@ If N is negative, search forwards for the -Nth following match." (comint-previous-matching-input (concat "^" (regexp-quote comint-matching-input-from-input-string)) n) - (goto-char opoint))) + (when (eq comint-move-point-for-matching-input 'after-input) + (goto-char opoint)))) (defun comint-next-matching-input-from-input (n) "Search forwards through input history for match for current input. commit cb726e75980ed56429f20ec70bb1e4a1d25732d2 Author: Michael Albinus Date: Tue Nov 22 10:16:54 2016 +0100 Add tramp-eshell-directory-change to eshell-first-time-mode-hook * lisp/net/tramp.el (tramp-eshell-directory-change): Add it also to `eshell-first-time-mode-hook'. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index abe8de3..52a4be8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4349,11 +4349,14 @@ Only works for Bourne-like shells." (eval-after-load "esh-util" '(progn - (tramp-eshell-directory-change) + (add-hook 'eshell-first-time-mode-hook + 'tramp-eshell-directory-change) (add-hook 'eshell-directory-change-hook 'tramp-eshell-directory-change) (add-hook 'tramp-unload-hook (lambda () + (remove-hook 'eshell-first-time-mode-hook + 'tramp-eshell-directory-change) (remove-hook 'eshell-directory-change-hook 'tramp-eshell-directory-change))))) commit 2043e6004cac26b8cfacf079cd31a1caa11a699d Merge: 4f9fdb7 16e705b Author: Michael Albinus Date: Tue Nov 22 09:21:03 2016 +0100 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 4f9fdb730ed8a1476698b5b1c9b11f4ebfdc1f63 Author: Michael Albinus Date: Tue Nov 22 09:20:21 2016 +0100 Dump also connection local variables in Tramp bug reports * lisp/net/tramp-cmds.el (tramp-bug, tramp-append-tramp-buffers): Dump also connection local variables. diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index d0c4915..208859d 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -190,6 +190,8 @@ This includes password cache, file cache, connection cache, buffers." password-cache password-cache-expiry remote-file-name-inhibit-cache + connection-local-class-alist + connection-local-criteria-alist file-name-handler-alist)))) (lambda (x y) (string< (symbol-name (car x)) (symbol-name (car y))))) @@ -294,7 +296,7 @@ buffer in your bug report. 'intern (all-completions "tramp-" (buffer-local-variables buffer))) ;; Non-tramp variables of interest. - '(default-directory)) + '(connection-local-variables-alist default-directory)) 'string<)) (reporter-dump-variable varsym elbuf)) (lisp-indent-line) commit 16e705bb56dc09278cd537a3763d867ab66f20a4 Author: Mark Oteiza Date: Tue Nov 22 02:42:47 2016 -0500 Make sure elided long buffer names have ellipses added (Bug#24972) * lisp/ibuffer.el (ibuffer-compile-make-eliding-form): Restore the string concat, and chop "strvar" less the width of the ellipsis. (ibuffer-compile-make-substring-form): Add space as padding, to fix off-by-one in alignment. diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index faadb67..dc5681c 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1556,19 +1556,23 @@ If point is on a group name, this function operates on that group." (if (or elide (with-no-warnings ibuffer-elide-long-columns)) `(if (> strlen 5) ,(if from-end-p + ;; FIXME: this should probably also be using + ;; `truncate-string-to-width' (Bug#24972) `(concat ,ellipsis (substring ,strvar (string-width ibuffer-eliding-string))) - `(truncate-string-to-width - ,strvar strlen nil nil - ,ellipsis)) + `(concat + (truncate-string-to-width + ,strvar (- strlen (string-width ,ellipsis)) nil ?.) + ,ellipsis)) ,strvar) strvar))) (defun ibuffer-compile-make-substring-form (strvar maxvar from-end-p) (if from-end-p - `(truncate-string-to-width str (string-width str) (- strlen ,maxvar)) - `(truncate-string-to-width ,strvar ,maxvar))) + ;; FIXME: not sure if this case is correct (Bug#24972) + `(truncate-string-to-width str (string-width str) (- strlen ,maxvar) nil ?\s) + `(truncate-string-to-width ,strvar ,maxvar nil ?\s))) (defun ibuffer-compile-make-format-form (strvar widthform alignment) (let* ((left `(make-string tmp2 ?\s)) commit 4940e0f9111731d8917bd98f885c34291cea04eb Author: Tino Calancha Date: Tue Nov 22 15:51:57 2016 +0900 Buffer-menu-no-header: Detect a fake header * lisp/buff-menu.el (Buffer-menu-no-header): Use 'tabulated-list-header-overlay-p' (Bug#24855). diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index f34c814..e2aa2da 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -344,7 +344,7 @@ is nil or omitted, and signal an error otherwise." (defun Buffer-menu-no-header () (beginning-of-line) (if (or Buffer-menu-use-header-line - (not (eq (char-after) ?C))) + (not (tabulated-list-header-overlay-p (point)))) t (ding) (forward-line 1) commit 27b754cb4432ece3efe3fc9d8e52a869ae061b7f Author: Tino Calancha Date: Tue Nov 22 15:23:50 2016 +0900 buff-menu: Add command to unmark all buffers Bind 'U' in buff-menu, bs and electric-buff-menu to commands to unmark all buffers (Bug#24880). * lisp/emacs-lisp/tabulated-list.el (tabulated-list-header-overlay-p): New predicate; return non-nil if tabulated-list has a fake header. * lisp/buff-menu.el (Buffer-menu-unmark-all-buffers): New command; remove all flags that use a particular mark from all the lines. Bind it to 'M-DEL'. (Buffer-menu-unmark-all): New command; remove all flags from all the lines. Bind it to 'U'. (Buffer-menu-marker-char, Buffer-menu-del-char): New variables. (Buffer-menu-delete, Buffer-menu-mark): Use them. (Buffer-menu-mode-map): Update menus. (Buffer-menu-mode): Update mode doc. * lisp/bs.el (bs-unmark-all, bs-unmark-previous): New commands. (bs-mode-map): Bind them to 'U' and '' respectively. (bs-mode): Update mode doc. * lisp/ebuff-menu.el (electric-buffer-menu-mode-map): Bind Buffer-menu-unmark-all to 'U' and Buffer-menu-unmark-all-buffers to 'M-DEL'. (bs--down, bs-down, bs--up, bs-up, bs-unmark-current, bs-mark-current): Use point instead of cursor in doc string. (electric-buffer-list): Update mode doc. * doc/emacs/buffers.texi (Several Buffers): Mention Buffer-menu-unmark-all and Buffer-menu-unmark-all-buffers. ; * etc/NEWS: Add an entry per each new feature. diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 2eb837f..c70e583 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -411,6 +411,18 @@ Remove all flags from the current line, and move down @kindex DEL @r{(Buffer Menu)} Move to the previous line and remove all flags on that line (@code{Buffer-menu-backup-unmark}). + +@item M-@key{DEL} +@findex Buffer-menu-unmark-all-buffers +@kindex M-DEL @r{(Buffer Menu)} +Remove a particular flag from all lines +(@code{Buffer-menu-unmark-all-buffers}). + +@item U +@findex Buffer-menu-unmark-all +@kindex U @r{(Buffer Menu)} +Remove all flags from all the lines +(@code{Buffer-menu-unmark-all}). @end table @noindent diff --git a/etc/NEWS b/etc/NEWS index 619d56b..02e93e4 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -283,6 +283,24 @@ the file's actual content before prompting the user. * Changes in Specialized Modes and Packages in Emacs 26.1 +** Electric-Buffer-menu + ++++ +*** Key 'U' is bound to 'Buffer-menu-unmark-all' and key 'M-DEL' is +bound to 'Buffer-menu-unmark-all-buffers'. + +** bs + +--- +*** Two new commands 'bs-unmark-all', bound to 'U', and +'bs-unmark-previous', bound to . + +** Buffer-menu + ++++ +*** Two new commands 'Buffer-menu-unmark-all', bound to 'U' and +'Buffer-menu-unmark-all-buffers', bound to 'M-DEL'. + ** Ibuffer --- diff --git a/lisp/bs.el b/lisp/bs.el index 8351169..d05a568 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -491,6 +491,8 @@ Used internally, only.") (define-key map "t" 'bs-visit-tags-table) (define-key map "m" 'bs-mark-current) (define-key map "u" 'bs-unmark-current) + (define-key map "U" 'bs-unmark-all) + (define-key map "\177" 'bs-unmark-previous) (define-key map ">" 'scroll-right) (define-key map "<" 'scroll-left) (define-key map "?" 'bs-help) @@ -635,6 +637,8 @@ For faster navigation each digit key is a digit argument. \\[bs-clear-modified] -- clear modified-flag on that buffer. \\[bs-mark-current] -- mark current line's buffer to be displayed. \\[bs-unmark-current] -- unmark current line's buffer to be displayed. +\\[bs-unmark-all] -- unmark all buffer lines. +\\[bs-unmark-previous] -- unmark previous line's buffer to be displayed. \\[bs-show-sorted] -- display buffer list sorted by next sort aspect. \\[bs-set-configuration-and-refresh] -- ask user for a configuration and \ apply selected configuration. @@ -867,7 +871,7 @@ the status of buffer on current line." (defun bs-mark-current (count) "Mark buffers. COUNT is the number of buffers to mark. -Move cursor vertically down COUNT lines." +Move point vertically down COUNT lines." (interactive "p") (bs--mark-unmark count (lambda (buf) @@ -876,12 +880,39 @@ Move cursor vertically down COUNT lines." (defun bs-unmark-current (count) "Unmark buffers. COUNT is the number of buffers to unmark. -Move cursor vertically down COUNT lines." +Move point vertically down COUNT lines." (interactive "p") (bs--mark-unmark count (lambda (buf) (setq bs--marked-buffers (delq buf bs--marked-buffers))))) +(defun bs-unmark-previous (count) + "Unmark previous COUNT buffers. +Move point vertically up COUNT lines. +When called interactively a numeric prefix argument sets COUNT." + (interactive "p") + (forward-line (- count)) + (save-excursion (bs-unmark-current count))) + +(defun bs-unmark-all () + "Unmark all buffers." + (interactive) + (let ((marked (string-to-char bs-string-marked)) + (current (string-to-char bs-string-current)) + (marked-cur (string-to-char bs-string-current-marked)) + (unmarked (string-to-char bs-string-show-normally)) + (inhibit-read-only t)) + (save-excursion + (goto-char (point-min)) + (forward-line 2) + (while (not (eobp)) + (if (eq (char-after) marked) + (subst-char-in-region (point) (1+ (point)) marked unmarked) + (when (eq (char-after) marked-cur) + (subst-char-in-region (point) (1+ (point)) marked-cur current))) + (forward-line 1)) + (setq bs--marked-buffers nil)))) + (defun bs--show-config-message (what) "Show message indicating the new showing status WHAT. WHAT is a value of nil, `never', or `always'." @@ -973,14 +1004,14 @@ Uses function `read-only-mode'." (apply fun args))) (defun bs-up (arg) - "Move cursor vertically up ARG lines in Buffer Selection Menu." + "Move point vertically up ARG lines in Buffer Selection Menu." (interactive "p") (if (and arg (numberp arg) (< arg 0)) (bs--nth-wrapper (- arg) 'bs--down) (bs--nth-wrapper arg 'bs--up))) (defun bs--up () - "Move cursor vertically up one line. + "Move point vertically up one line. If on top of buffer list go to last line." (if (> (count-lines 1 (point)) bs-header-lines-length) (forward-line -1) @@ -989,14 +1020,14 @@ If on top of buffer list go to last line." (recenter -1))) (defun bs-down (arg) - "Move cursor vertically down ARG lines in Buffer Selection Menu." + "Move point vertically down ARG lines in Buffer Selection Menu." (interactive "p") (if (and arg (numberp arg) (< arg 0)) (bs--nth-wrapper (- arg) 'bs--up) (bs--nth-wrapper arg 'bs--down))) (defun bs--down () - "Move cursor vertically down one line. + "Move point vertically down one line. If at end of buffer list go to first line." (if (eq (line-end-position) (point-max)) (progn diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 4742628..f34c814 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -37,6 +37,12 @@ :group 'tools :group 'convenience) +(defvar Buffer-menu-marker-char ?> + "The mark character for marked buffers.") + +(defvar Buffer-menu-del-char ?D + "Character used to flag buffers for deletion.") + (defcustom Buffer-menu-use-header-line t "If non-nil, use the header line to display Buffer Menu column titles." :type 'boolean @@ -121,6 +127,8 @@ commands.") (define-key map "\177" 'Buffer-menu-backup-unmark) (define-key map "~" 'Buffer-menu-not-modified) (define-key map "u" 'Buffer-menu-unmark) + (define-key map "\M-\177" 'Buffer-menu-unmark-all-buffers) + (define-key map "U" 'Buffer-menu-unmark-all) (define-key map "m" 'Buffer-menu-mark) (define-key map "t" 'Buffer-menu-visit-tags-table) (define-key map "%" 'Buffer-menu-toggle-read-only) @@ -197,6 +205,12 @@ commands.") (bindings--define-key menu-map [umk] '(menu-item "Unmark" Buffer-menu-unmark :help "Cancel all requested operations on buffer on this line and move down")) + (bindings--define-key menu-map [umkab] + '(menu-item "Remove marks..." Buffer-menu-unmark-all-buffers + :help "Cancel a requested operation on all buffers")) + (bindings--define-key menu-map [umka] + '(menu-item "Unmark all" Buffer-menu-unmark-all + :help "Cancel all requested operations on buffers")) (bindings--define-key menu-map [mk] '(menu-item "Mark" Buffer-menu-mark :help "Mark buffer on this line for being displayed by v command")) @@ -239,6 +253,8 @@ In Buffer Menu mode, the following commands are defined: \\[Buffer-menu-execute] Delete or save marked buffers. \\[Buffer-menu-unmark] Remove all marks from current line. With prefix argument, also move up one line. +\\[Buffer-menu-unmark-all-buffers] Remove a particular mark from all lines. +\\[Buffer-menu-unmark-all] Remove all marks from all lines. \\[Buffer-menu-backup-unmark] Back up a line and remove marks. \\[Buffer-menu-toggle-read-only] Toggle read-only status of buffer on this line. \\[revert-buffer] Update the list of buffers. @@ -346,7 +362,7 @@ is nil or omitted, and signal an error otherwise." "Mark the Buffer menu entry at point for later display. It will be displayed by the \\\\[Buffer-menu-select] command." (interactive) - (tabulated-list-set-col 0 ">" t) + (tabulated-list-set-col 0 (char-to-string Buffer-menu-marker-char) t) (forward-line)) (defun Buffer-menu-unmark (&optional backup) @@ -356,6 +372,28 @@ Optional prefix arg means move up." (Buffer-menu--unmark) (forward-line (if backup -1 1))) +(defun Buffer-menu-unmark-all-buffers (mark) + "Cancel a requested operation on all buffers. +MARK is the character to flag the operation on the buffers. +When called interactively prompt for MARK; RET remove all marks." + (interactive "cRemove marks (RET means all):") + (save-excursion + (goto-char (point-min)) + (when (tabulated-list-header-overlay-p) + (forward-line)) + (while (not (eobp)) + (let ((xmarks (list (aref (tabulated-list-get-entry) 0) + (aref (tabulated-list-get-entry) 2)))) + (when (or (char-equal mark ?\r) + (member (char-to-string mark) xmarks)) + (Buffer-menu--unmark))) + (forward-line)))) + +(defun Buffer-menu-unmark-all () + "Cancel all requested operations on buffers." + (interactive) + (Buffer-menu-unmark-all-buffers ?\r)) + (defun Buffer-menu-backup-unmark () "Move up and cancel all requested operations on buffer on line above." (interactive) @@ -382,12 +420,12 @@ buffers to delete; a negative ARG means to delete backwards." (setq arg 1)) (while (> arg 0) (when (Buffer-menu-buffer) - (tabulated-list-set-col 0 "D" t)) + (tabulated-list-set-col 0 (char-to-string Buffer-menu-del-char) t)) (forward-line 1) (setq arg (1- arg))) (while (< arg 0) (when (Buffer-menu-buffer) - (tabulated-list-set-col 0 "D" t)) + (tabulated-list-set-col 0 (char-to-string Buffer-menu-del-char) t)) (forward-line -1) (setq arg (1+ arg)))) diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 5536f94..74a9dd5 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -55,6 +55,8 @@ (define-key map "\177" 'Buffer-menu-backup-unmark) (define-key map "~" 'Buffer-menu-not-modified) (define-key map "u" 'Buffer-menu-unmark) + (define-key map "\M-\177" 'Buffer-menu-unmark-all-buffers) + (define-key map "U" 'Buffer-menu-unmark-all) (let ((i ?0)) (while (<= i ?9) (define-key map (char-to-string i) 'digit-argument) @@ -114,6 +116,7 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry. \\[Buffer-menu-save] -- mark that buffer to be saved. \\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted. \\[Buffer-menu-unmark] -- remove all kinds of marks from current line. +\\[Buffer-menu-unmark-all] -- remove all kinds of marks from all lines. \\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done. \\[Buffer-menu-backup-unmark] -- back up a line and remove marks." (interactive "P") diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index cf297f1..9523d5e 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -259,6 +259,12 @@ Do nothing if `tabulated-list--header-string' is nil." (make-overlay (point-min) (point)))) (overlay-put tabulated-list--header-overlay 'face 'underline)))) +(defsubst tabulated-list-header-overlay-p (&optional pos) + "Return non-nil if there is a fake header. +Optional arg POS is a buffer position where to look for a fake header; +defaults to `point-min'." + (overlays-at (or pos (point-min)))) + (defun tabulated-list-revert (&rest ignored) "The `revert-buffer-function' for `tabulated-list-mode'. It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'." commit 3c194dafe080c45528063a20075f8cd53a3760b3 Author: Mark Oteiza Date: Mon Nov 21 23:05:47 2016 -0500 Revert "* lisp/htmlfontify.el (hfy-force-fontification): Use font-lock-ensure." This reverts commit 10efaf718c5258af0ba62077cf4e2aaf9fb90227. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index a10d65b..5ffbb6d 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1825,7 +1825,7 @@ fontified. This is a simple convenience wrapper around (if (fboundp 'font-lock-ensure) (font-lock-ensure) (when font-lock-defaults - (font-lock-ensure)))) + (font-lock-fontify-buffer)))) ((fboundp #'jit-lock-fontify-now) (message "hfy jit-lock mode (%S %S)" window-system major-mode) (jit-lock-fontify-now)) commit f9946cab7e30a7e01806c4d6273a9251a4504c16 Author: Mark Oteiza Date: Mon Nov 21 14:50:15 2016 -0500 Port htmlfontify to cl-lib * lisp/htmlfontify.el: (hfy-box-to-border-assoc, hfy-box-to-style): (hfy-decor, hfy-face-to-style-i, hfy-face-at, hfy-merge-adjacent-spans): (hfy-fontify-buffer, htmlfontify-string, hfy-mark-tag-names): Replace instances of cl aliases with their cl-lib counterparts. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 08d1dd2..a10d65b 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -81,7 +81,7 @@ ;; Changes: moved to changelog (CHANGES) file. ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'faces) ;; (`facep' `face-attr-construct' `x-color-values' `color-values' `face-name') (require 'custom) @@ -818,7 +818,7 @@ regular specifiers." (if spec (let ((tag (car spec)) (val (cadr spec))) - (cons (case tag + (cons (cl-case tag (:color (cons "colour" val)) (:width (cons "width" val)) (:style (cons "style" val))) @@ -831,7 +831,7 @@ regular specifiers." (list (if col (cons "border-color" (cdr (assoc "colour" css)))) (cons "border-width" (format "%dpx" (or (cdr (assoc "width" css)) 1))) - (cons "border-style" (case s + (cons "border-style" (cl-case s (released-button "outset") (pressed-button "inset" ) (t "solid" )))))) @@ -850,7 +850,7 @@ TAG is an Emacs font attribute key (eg :underline). VAL is ignored." (list ;; FIXME: Why not '("text-decoration" . "underline")? --Stef - (case tag + (cl-case tag (:underline (cons "text-decoration" "underline" )) (:overline (cons "text-decoration" "overline" )) (:strike-through (cons "text-decoration" "line-through"))))) @@ -1003,7 +1003,7 @@ merged by the user - `hfy-flatten-style' should do this." (hfy-face-to-style-i (hfy-face-attr-for-class v hfy-display-class)))))) (setq this - (if val (case key + (if val (cl-case key (:family (hfy-family val)) (:width (hfy-width val)) (:weight (hfy-weight val)) @@ -1287,7 +1287,7 @@ return a `defface' style list of face properties instead of a face symbol." (setq fprops (cdr fprops))) ;; ((prop val)) (setq p (caar fprops)) - (setq v (cadar fprops)) + (setq v (cl-cadar fprops)) (setq fprops (cdr fprops))) (if (listp (cdr fprops)) (progn @@ -1304,7 +1304,7 @@ return a `defface' style list of face properties instead of a face symbol." (setq v (cdr fprops)) (setq fprops nil)) (error "Eh... another format! fprops=%s" fprops) ))) - (setq p (case p + (setq p (cl-case p ;; These are all the properties handled ;; in `hfy-face-to-style-i'. ;; @@ -1407,8 +1407,8 @@ Returns a modified copy of FACE-MAP." ;;(push (car tmp-map) reduced-map) ;;(push (cadr tmp-map) reduced-map) (while tmp-map - (setq first-start (cadddr tmp-map) - first-stop (caddr tmp-map) + (setq first-start (cl-cadddr tmp-map) + first-stop (cl-caddr tmp-map) last-start (cadr tmp-map) last-stop (car tmp-map) map-buf tmp-map @@ -1421,8 +1421,8 @@ Returns a modified copy of FACE-MAP." (not (re-search-forward "[^ \t\n\r]" (car last-start) t)))) (setq map-buf (cddr map-buf) span-start first-start - first-start (cadddr map-buf) - first-stop (caddr map-buf) + first-start (cl-cadddr map-buf) + first-stop (cl-caddr map-buf) last-start (cadr map-buf) last-stop (car map-buf))) (push span-stop reduced-map) @@ -1762,7 +1762,7 @@ FILE, if set, is the file name." (if (not (setq pr (get-text-property pt lp))) nil (goto-char pt) (remove-text-properties pt (1+ pt) (list lp nil)) - (case lp + (cl-case lp (hfy-link (if (setq rr (get-text-property pt 'hfy-inst)) (insert (format "" rr))) @@ -1805,7 +1805,7 @@ It is assumed that STRING has text properties that allow it to be fontified. This is a simple convenience wrapper around `htmlfontify-buffer'." (let* ((hfy-optimizations-1 (copy-sequence hfy-optimizations)) - (hfy-optimizations (pushnew 'skip-refontification hfy-optimizations-1))) + (hfy-optimizations (cl-pushnew 'skip-refontification hfy-optimizations-1))) (with-temp-buffer (insert string) (htmlfontify-buffer) @@ -1962,7 +1962,7 @@ property, with a value of \"tag.line-number\"." (lambda (TLIST) (if (string= file (car TLIST)) (let* ((line (cadr TLIST) ) - (chr (caddr TLIST) ) + (chr (cl-caddr TLIST)) (link (format "%s.%d" TAG line) )) (put-text-property (+ 1 chr) (+ 2 chr) commit 10efaf718c5258af0ba62077cf4e2aaf9fb90227 Author: Mark Oteiza Date: Mon Nov 21 12:56:15 2016 -0500 * lisp/htmlfontify.el (hfy-force-fontification): Use font-lock-ensure. diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 52bc36e..08d1dd2 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1825,7 +1825,7 @@ fontified. This is a simple convenience wrapper around (if (fboundp 'font-lock-ensure) (font-lock-ensure) (when font-lock-defaults - (font-lock-fontify-buffer)))) + (font-lock-ensure)))) ((fboundp #'jit-lock-fontify-now) (message "hfy jit-lock mode (%S %S)" window-system major-mode) (jit-lock-fontify-now)) commit 9de7c6752bffa99535bb42320a2a1936118a4515 Author: Paul Eggert Date: Mon Nov 21 08:42:12 2016 -0800 Fix another CANNOT_DUMP problem Reported by Robert Pluim in: http://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00468.html * src/emacs.c (might_dump) [CANNOT_DUMP]: Move enum decl from here ... * src/lisp.h: ... to here. diff --git a/src/emacs.c b/src/emacs.c index 48df533..f633f09 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -130,9 +130,7 @@ Lisp_Object Vlibrary_cache; on subsequent starts. */ bool initialized; -#ifdef CANNOT_DUMP -enum { might_dump = false }; -#else +#ifndef CANNOT_DUMP /* Set to true if this instance of Emacs might dump. */ # ifndef DOUG_LEA_MALLOC static diff --git a/src/lisp.h b/src/lisp.h index e087828..b4ddad1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -603,8 +603,10 @@ extern void char_table_set (Lisp_Object, int, Lisp_Object); extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object); +#ifdef CANNOT_DUMP +enum { might_dump = false }; +#elif defined DOUG_LEA_MALLOC /* Defined in emacs.c. */ -#ifdef DOUG_LEA_MALLOC extern bool might_dump; #endif /* True means Emacs has already been initialized.