diff options
| author | Glenn Morris <rgm@gnu.org> | 2014-07-08 19:04:12 -0700 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2014-07-08 19:04:12 -0700 |
| commit | 5613a6f6d52bca0018c5777aba67a99f51016a35 (patch) | |
| tree | c070100c79442ae2f9876f82af4eeebadc39249c /lisp | |
| parent | 27e81f9f4e368176a3b17ceeadd2e0aa5dd9d1ed (diff) | |
| parent | d8899d09b992d733dc1cc6ec93b11cb75ce84f5d (diff) | |
| download | emacs-5613a6f6d52bca0018c5777aba67a99f51016a35.tar.gz | |
Merge from emacs-24; up to 2014-06-19T14:03:45Z!monnier@iro.umontreal.ca
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 63 | ||||
| -rw-r--r-- | lisp/calendar/todo-mode.el | 139 | ||||
| -rw-r--r-- | lisp/desktop.el | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/edebug.el | 2 | ||||
| -rw-r--r-- | lisp/emulation/cua-rect.el | 8 | ||||
| -rw-r--r-- | lisp/facemenu.el | 2 | ||||
| -rw-r--r-- | lisp/faces.el | 9 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 7 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 7 | ||||
| -rw-r--r-- | lisp/startup.el | 25 |
11 files changed, 165 insertions, 100 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0158ce91aea..f50993e2131 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,66 @@ +2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/sh-script.el (sh-smie-sh-rules): Don't align with a && in + the middle of a line (bug#17896). + +2014-07-09 Juri Linkov <juri@jurta.org> + + * startup.el (command-line): Append displaying the warning about + the errors in the init file to the end of `after-init-hook'. + (Bug#17927) + + * faces.el (face-name): Return input arg `face' as-is + when it's not a symbol. + (x-resolve-font-name): Don't check if the face is a symbol. + (Bug#17956) + + * facemenu.el (list-colors-print): In help-echo format use %.2f + instead of %d because now HSV values are floating-point components + between 0.0 and 1.0. + +2014-07-09 Glenn Morris <rgm@gnu.org> + + * emulation/cua-rect.el (cua--activate-rectangle): + Avoid setting cua--rectangle to nil. (Bug#17877) + +2014-07-09 Stephen Berman <stephen.berman@gmx.net> + + * calendar/todo-mode.el: Fix wrong-type-argument error when + marking multiple consecutive items. + (todo-toggle-mark-item): Don't try to mark the empty lines at the + end of the todo and done items sections. Note in doc string that + items marked by passing a numeric prefix argument can include the + last todo and first done items. + (todo-mark-category): Don't try to mark the empty line between the + todo and done items sections. + +2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/edebug.el (edebug-eval-defun): Print result using + proper Lisp quoting (bug#17934). + + * progmodes/ruby-mode.el (ruby-mode-variables): Don't meddle with + require-final-newline since prog-mode already took care of it (bug#17947). + +2014-07-09 Stephen Berman <stephen.berman@gmx.net> + + * calendar/todo-mode.el: Fix two bugs. Shorten Commentary and + refer to the Todo mode Info manual. Update the comment on + requiring cl-lib. + (todo-find-filtered-items-file): Add todo-prefix overlays. + (todo-filter-items): Reorder a let-bound variable to avoid a + wrong-type-argument error on canceling the file choice dialog. + +2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/octave.el (inferior-octave-mode): + Set comint-input-ring-size to a number (bug#17912). + +2014-07-09 Juri Linkov <juri@jurta.org> + + * desktop.el (desktop-minor-mode-table): Add `defining-kbd-macro' + and `isearch-mode' associated with nil. (Bug#17849) + 2014-07-08 Stefan Monnier <monnier@iro.umontreal.ca> * linum.el (linum--face-height): New function (bug#17813). diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 759b7773713..7429819adc9 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -24,63 +24,37 @@ ;;; Commentary: -;; This package provides facilities for making, displaying, navigating -;; and editing todo lists, which are prioritized lists of todo items. -;; Todo lists are identified with named categories, so you can group -;; together and separately prioritize thematically related todo items. -;; Each category is stored in a file, which thus provides a further -;; level of organization. You can create as many todo files, and in -;; each as many categories, as you want. +;; This package provides facilities for making and maintaining +;; prioritized lists of things to do. These todo lists are identified +;; with named categories, so you can group together thematically +;; related todo items. Each category is stored in a file, providing a +;; further level of organization. You can create as many todo files, +;; and in each as many categories, as you want. ;; With Todo mode you can navigate among the items of a category, and ;; between categories in the same and in different todo files. You -;; can edit todo items, reprioritize them within their category, move -;; them to another category, delete them, or mark items as done and -;; store them separately from the not yet done items in a category. -;; You can add new todo files, edit and delete them. You can add new -;; categories, rename and delete them, move categories to another file -;; and merge the items of two categories. You can also reorder the -;; sequence of categories in a todo file for the purpose of -;; navigation. You can display summary tables of the categories in a -;; file and the types of items they contain. And you can compile -;; lists of existing items from multiple categories in one or more -;; todo files, which are filtered by various criteria. - -;; To get started, load this package and type `M-x todo-show'. This -;; will prompt you for the name of the first todo file, its first -;; category and the category's first item, create these and display -;; them in Todo mode. Now you can insert further items into the list -;; (i.e., the category) and assign them priorities by typing `i i'. - -;; You will probably find it convenient to give `todo-show' a global -;; key binding in your init file, since it is one of the entry points -;; to Todo mode; a good choice is `C-c t', since `todo-show' is -;; bound to `t' in Todo mode. - -;; To see a list of all Todo mode commands and their key bindings, -;; including other entry points, type `C-h m' in Todo mode. Consult -;; the documentation strings of the commands for details of their use. -;; The `todo' customization group and its subgroups list the options -;; you can set to alter the behavior of many commands and various -;; aspects of the display. - -;; This package is a new version of Oliver Seidel's todo-mode.el. -;; While it retains the same basic organization and handling of todo -;; lists and the basic UI, it significantly extends these and adds -;; many features. This required also making changes to the internals, -;; including the file format. If you have a todo file in old format, -;; then the first time you invoke `todo-show' (i.e., before you have -;; created any todo file in the current format), it will ask you -;; whether to convert that file and show it. If you choose not to -;; convert the old-style file at this time, you can do so later by -;; calling the command `todo-convert-legacy-files'. +;; can add and edit todo items, reprioritize them, move them to +;; another category, or delete them. You can also mark items as done +;; and store them within their category or in separate archive files. +;; You can include todo items in the Emacs Fancy Diary display and +;; treat them as appointments. You can add new todo files, and rename +;; or delete them. You can add new categories to a file, rename or +;; delete them, move a category to another file and merge the items of +;; two categories. You can also reorder the sequence of categories in +;; a todo file for the purpose of navigation. You can display +;; sortable summary tables of the categories in a file and the types +;; of items they contain. And you can filter items by various +;; criteria from multiple categories in one or more todo files to +;; create prioritizable cross-category overviews of your todo items. + +;; To get started, type `M-x todo-show'. For full details of the user +;; interface, commands and options, consult the Todo mode user manual, +;; which is included in the Info documentation. ;;; Code: (require 'diary-lib) -;; For cl-remove-duplicates (in todo-insertion-commands-args) and -;; cl-oddp. -(require 'cl-lib) +(require 'cl-lib) ; For cl-oddp and cl-assert. ;; ----------------------------------------------------------------------------- ;;; Setting up todo files, categories, and items @@ -1736,31 +1710,40 @@ means prompt user and omit comment only on confirmation." (defun todo-toggle-mark-item (&optional n) "Mark item with `todo-item-mark' if unmarked, otherwise unmark it. -With a positive numerical prefix argument N, change the -marking of the next N items." +With positive numerical prefix argument N, change the marking of +the next N items in the current category. If both the todo and +done items sections are visible, the sequence of N items can +consist of the the last todo items and the first done items." (interactive "p") (when (todo-item-string) (unless (> n 1) (setq n 1)) - (dotimes (i n) - (let* ((cat (todo-current-category)) - (marks (assoc cat todo-categories-with-marks)) - (ov (progn - (unless (looking-at todo-item-start) - (todo-item-start)) - (todo-get-overlay 'prefix))) - (pref (overlay-get ov 'before-string))) - (if (todo-marked-item-p) - (progn - (overlay-put ov 'before-string (substring pref 1)) - (if (= (cdr marks) 1) ; Deleted last mark in this category. - (setq todo-categories-with-marks - (assq-delete-all cat todo-categories-with-marks)) - (setcdr marks (1- (cdr marks))))) - (overlay-put ov 'before-string (concat todo-item-mark pref)) - (if marks - (setcdr marks (1+ (cdr marks))) - (push (cons cat 1) todo-categories-with-marks)))) - (todo-forward-item)))) + (catch 'end + (dotimes (i n) + (let* ((cat (todo-current-category)) + (marks (assoc cat todo-categories-with-marks)) + (ov (progn + (unless (looking-at todo-item-start) + (todo-item-start)) + (todo-get-overlay 'prefix))) + (pref (overlay-get ov 'before-string))) + (if (todo-marked-item-p) + (progn + (overlay-put ov 'before-string (substring pref 1)) + (if (= (cdr marks) 1) ; Deleted last mark in this category. + (setq todo-categories-with-marks + (assq-delete-all cat todo-categories-with-marks)) + (setcdr marks (1- (cdr marks))))) + (overlay-put ov 'before-string (concat todo-item-mark pref)) + (if marks + (setcdr marks (1+ (cdr marks))) + (push (cons cat 1) todo-categories-with-marks)))) + (todo-forward-item) + ;; Don't try to mark the empty lines at the end of the todo + ;; and done items sections. + (when (looking-at "^$") + (if (eobp) + (throw 'end nil) + (todo-forward-item))))))) (defun todo-mark-category () "Mark all visible items in this category with `todo-item-mark'." @@ -1777,7 +1760,12 @@ marking of the next N items." (if marks (setcdr marks (1+ (cdr marks))) (push (cons cat 1) todo-categories-with-marks)))) - (todo-forward-item))))) + (todo-forward-item) + ;; Don't try to mark the empty line between the todo and done + ;; items sections. + (when (looking-at "^$") + (unless (eobp) + (todo-forward-item))))))) (defun todo-unmark-category () "Remove `todo-item-mark' from all visible items in this category." @@ -3973,7 +3961,8 @@ regexp items." (setq file (cdr (assoc-string file falist))) (find-file file) (unless (derived-mode-p 'todo-filtered-items-mode) - (todo-filtered-items-mode)))) + (todo-filtered-items-mode)) + (todo-prefix-overlays))) (defun todo-go-to-source-item () "Display the file and category of the filtered item at point." @@ -4082,7 +4071,6 @@ multifile commands for further details." (progn (todo-multiple-filter-files) todo-multiple-filter-files)) (list todo-current-todo-file))) - (multi (> (length flist) 1)) (fname (if (equal flist 'quit) ;; Pressed `cancel' in t-m-f-f file selection dialog. (keyboard-quit) @@ -4091,6 +4079,7 @@ multifile commands for further details." (cond (top ".todt") (diary ".tody") (regexp ".todr"))))) + (multi (> (length flist) 1)) (rxfiles (when regexp (directory-files todo-directory t ".*\\.todr$" t))) (file-exists (or (file-exists-p fname) rxfiles)) diff --git a/lisp/desktop.el b/lisp/desktop.el index 4bb6fba3532..12207f3cdac 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -528,6 +528,8 @@ Furthermore the major mode function must be autoloaded.") (defcustom desktop-minor-mode-table '((auto-fill-function auto-fill-mode) + (defining-kbd-macro nil) + (isearch-mode nil) (vc-mode nil) (vc-dired-mode nil) (erc-track-minor-mode nil) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index e2d38ffe858..892fa7f2d37 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -497,7 +497,7 @@ the minibuffer." (setq edebug-result (eval (eval-sexp-add-defvars form) lexical-binding)) (if (not edebugging) (prog1 - (princ edebug-result) + (prin1 edebug-result) (let ((str (eval-expression-print-format edebug-result))) (if str (princ str)))) edebug-result))) diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index d516bd4c7cc..31dd137a6b9 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -726,11 +726,11 @@ If command is repeated at same position, delete the rectangle." ;; Set cua--rectangle to indicate we're marking a rectangle. ;; Be careful if we are already marking a rectangle. (setq cua--rectangle - (if (and cua--last-rectangle + (or (and cua--last-rectangle (eq (car cua--last-rectangle) (current-buffer)) - (eq (car (cdr cua--last-rectangle)) (point))) - (cdr (cdr cua--last-rectangle)) - (cua--rectangle-get-corners)) + (eq (car (cdr cua--last-rectangle)) (point)) + (cdr (cdr cua--last-rectangle))) + (cua--rectangle-get-corners)) cua--status-string (if (cua--rectangle-virtual-edges) " [R]" "") cua--last-rectangle nil) (activate-mark)) diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 24613ecd236..678aca24c12 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -620,7 +620,7 @@ color. The function should accept a single argument, the color name." 'help-echo (let ((hsv (apply 'color-rgb-to-hsv (color-name-to-rgb (car color))))) - (format "H:%d S:%d V:%d" + (format "H:%.2f S:%.2f V:%.2f" (nth 0 hsv) (nth 1 hsv) (nth 2 hsv))))) (when callback (make-text-button diff --git a/lisp/faces.el b/lisp/faces.el index d8b3c7a6b0f..bb77af0425e 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -370,7 +370,10 @@ If `inhibit-x-resources' is non-nil, this function does nothing." (defun face-name (face) "Return the name of face FACE." - (symbol-name (check-face face))) + (check-face face) + (if (symbolp face) + (symbol-name face) + face)) (defun face-all-attributes (face &optional frame) @@ -2746,8 +2749,8 @@ If PATTERN is nil, return the name of the frame's base font, which never contains wildcards. Given optional arguments FACE and FRAME, return a font which is also the same size as FACE on FRAME, or fail." - (or (symbolp face) - (setq face (face-name face))) + (when face + (setq face (face-name face))) (and (eq frame t) (setq frame nil)) (if pattern diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 3fdcec219d3..25b081545a3 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -747,9 +747,10 @@ Key bindings: (setq-local info-lookup-mode 'octave-mode) (setq-local eldoc-documentation-function 'octave-eldoc-function) - (setq comint-input-ring-file-name - (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") - comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) + (setq-local comint-input-ring-file-name + (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist")) + (setq-local comint-input-ring-size + (string-to-number (or (getenv "OCTAVE_HISTSIZE") "1024"))) (comint-read-input-ring t) (setq-local comint-dynamic-complete-functions inferior-octave-dynamic-complete-functions) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 3c20279600e..2f23e338f81 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -749,7 +749,6 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." :forward-token #'ruby-smie--forward-token :backward-token #'ruby-smie--backward-token) (setq-local indent-line-function 'ruby-indent-line)) - (setq-local require-final-newline t) (setq-local comment-start "# ") (setq-local comment-end "") (setq-local comment-column ruby-comment-column) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index eb6a55689c1..dd1057ebf8d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2012,9 +2012,10 @@ May return nil if the line should not be treated as continued." (<= indent initial))))) `(column . ,(+ initial sh-indentation))) (`(:before . ,(or `"(" `"{" `"[")) - (when (smie-rule-hanging-p) - (if (not (smie-rule-prev-p "&&" "||" "|")) - (smie-rule-parent) + (if (not (smie-rule-prev-p "&&" "||" "|")) + (when (smie-rule-hanging-p) + (smie-rule-parent)) + (unless (smie-rule-bolp) (smie-backward-sexp 'halfexp) `(column . ,(smie-indent-virtual))))) ;; FIXME: Maybe this handling of ;; should be made into diff --git a/lisp/startup.el b/lisp/startup.el index aa448848cea..d984e6269ae 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1182,18 +1182,25 @@ please check its value") (funcall inner) (setq init-file-had-error nil)) (error - (display-warning - 'initialization - (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\ + ;; Postpone displaying the warning until all hooks + ;; in `after-init-hook' like `desktop-read' will finalize + ;; possible changes in the window configuration. + (add-hook + 'after-init-hook + (lambda () + (display-warning + 'initialization + (format "An error occurred while loading `%s':\n\n%s%s%s\n\n\ To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace." - user-init-file - (get (car error) 'error-message) - (if (cdr error) ": " "") - (mapconcat (lambda (s) (prin1-to-string s t)) - (cdr error) ", ")) - :warning) + user-init-file + (get (car error) 'error-message) + (if (cdr error) ": " "") + (mapconcat (lambda (s) (prin1-to-string s t)) + (cdr error) ", ")) + :warning)) + t) (setq init-file-had-error t)))) (if (and deactivate-mark transient-mark-mode) |
