diff options
author | Glenn Morris <rgm@gnu.org> | 2014-09-02 21:21:40 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-09-02 21:21:40 -0700 |
commit | 62fca47221fc9d248511cd94fbcb41ddb46763e6 (patch) | |
tree | d039e0d0580f884abbfd7515b63ef7bc4aabeaaa /lisp | |
parent | e6769f18909edfd1bbf6473a1f754ab29e2fb114 (diff) | |
parent | af86b05fd4b79c3d1c3b71c6193c4295a1265594 (diff) | |
download | emacs-62fca47221fc9d248511cd94fbcb41ddb46763e6.tar.gz |
Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ru
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 42 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 38 | ||||
-rw-r--r-- | lisp/progmodes/gud.el | 21 | ||||
-rw-r--r-- | lisp/progmodes/python.el | 8 | ||||
-rw-r--r-- | lisp/startup.el | 2 | ||||
-rw-r--r-- | lisp/subr.el | 5 | ||||
-rw-r--r-- | lisp/tar-mode.el | 9 | ||||
-rw-r--r-- | lisp/tutorial.el | 6 |
8 files changed, 83 insertions, 48 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3edfdad0cf0..29fec987a2e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,47 @@ 2014-09-03 Stefan Monnier <monnier@iro.umontreal.ca> + * emacs-lisp/package.el (package-generate-description-file): + Properly quote the arguments (bug#18332). Change second arg. + (package--alist-to-plist-args): Rename from package--alist-to-plist and + quote the elements. + (package--make-autoloads-and-stuff): Fix the test for pre-existence of + the *-pkg.el file. Adjust to new calling convention of + package-generate-description-file. + + * progmodes/gud.el (gud-gdb-completion-at-point): Add hack (bug#18282). + (gud-gdb-completions): Remove obsolete workaround. + +2014-09-03 Eli Zaretskii <eliz@gnu.org> + + * subr.el (posn-col-row): Revert the change from commit + 2010-11-13T21:07:58Z!eliz@gnu.org, which + was inadvertently merged from emacs-23 release branch in 2010-11-18T03:54:14Z!monnier@iro.umontreal.ca + monnier@iro.umontreal.ca-20101118035414-yvlg7k7dk4k4l3q, and + introduced an off-by-one error in the reported row when there is a + header line. (Bug#18384) + +2014-09-03 Fabián Ezequiel Gallina <fgallina@gnu.org> + + * progmodes/python.el (python-indent-post-self-insert-function): + Avoid electric colon at beginning-of-defun. (Bug#18228) + +2014-09-03 Glenn Morris <rgm@gnu.org> + + * tutorial.el (tutorial--display-changes): + Fix 2014-08-01 change. (Bug#18382) + +2014-09-03 Ken Brown <kbrown@cornell.edu> + + * startup.el (fancy-splash-frame): Extend the fix for Bug#16014 to + the Cygwin-w32 build. (Bug#18347) + +2014-09-03 Glenn Morris <rgm@gnu.org> + + * tar-mode.el (tar--extract, tar-extract): + Avoid permanently disabling undo in extracted buffers. (Bug#18344) + +2014-09-03 Stefan Monnier <monnier@iro.umontreal.ca> + * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better handle multiline elements (bug#18380). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4d7ed8f121c..1649ee0ea1a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -689,11 +689,9 @@ untar into a directory named DIR; otherwise, signal an error." (error "Package does not untar cleanly into directory %s/" dir))))) (tar-untar-buffer)) -(defun package-generate-description-file (pkg-desc pkg-dir) +(defun package-generate-description-file (pkg-desc pkg-file) "Create the foo-pkg.el file for single-file packages." - (let* ((name (package-desc-name pkg-desc)) - (pkg-file (expand-file-name (package--description-file pkg-dir) - pkg-dir))) + (let* ((name (package-desc-name pkg-desc))) (let ((print-level nil) (print-quoted t) (print-length nil)) @@ -714,25 +712,20 @@ untar into a directory named DIR; otherwise, signal an error." (list (car elt) (package-version-join (cadr elt)))) requires)))) - (let ((alist (package-desc-extras pkg-desc)) - flat) - (while alist - (let* ((pair (pop alist)) - (key (car pair)) - (val (cdr pair))) - ;; Don't bother ‘quote’ing ‘key’; it is always a keyword. - (push key flat) - (push (if (and (not (consp val)) - (or (keywordp val) - (not (symbolp val)) - (memq val '(nil t)))) - val - `',val) - flat))) - (nreverse flat)))) + (package--alist-to-plist-args + (package-desc-extras pkg-desc)))) "\n") nil pkg-file nil 'silent)))) +(defun package--alist-to-plist-args (alist) + (mapcar (lambda (x) + (if (and (not (consp x)) + (or (keywordp x) + (not (symbolp x)) + (memq x '(nil t)))) + x `',x)) + (apply #'nconc + (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist)))) (defun package-unpack (pkg-desc) "Install the contents of the current buffer as a package." (let* ((name (package-desc-name pkg-desc)) @@ -764,9 +757,10 @@ untar into a directory named DIR; otherwise, signal an error." (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir) "Generate autoloads, description file, etc.. for PKG-DESC installed at PKG-DIR." (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir) - (let ((desc-file (package--description-file pkg-dir))) + (let ((desc-file (expand-file-name (package--description-file pkg-dir) + pkg-dir))) (unless (file-exists-p desc-file) - (package-generate-description-file pkg-desc pkg-dir))) + (package-generate-description-file pkg-desc desc-file))) ;; FIXME: Create foo.info and dir file from foo.texi? ) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 09085f71d62..a2e015fd287 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -810,18 +810,6 @@ CONTEXT is the text before COMMAND on the line." (current-buffer) ;; From string-match above. (length context)))) - ;; `gud-gdb-run-command-fetch-lines' has some nasty side-effects on the - ;; buffer (via `gud-delete-prompt-marker'): it removes the prompt and then - ;; re-adds it later, thus messing up markers and overlays along the way. - ;; This is a problem for completion-in-region which uses an overlay to - ;; create a field. - ;; So we restore completion-in-region's field if needed. - ;; FIXME: change gud-gdb-run-command-fetch-lines so it doesn't modify the - ;; buffer at all. - (when (/= start (- (point) (field-beginning))) - (dolist (ol (overlays-at (1- (point)))) - (when (eq (overlay-get ol 'field) 'completion) - (move-overlay ol (- (point) start) (overlay-end ol))))) ;; Protect against old versions of GDB. (and complete-list (string-match "^Undefined command: \"complete\"" (car complete-list)) @@ -860,7 +848,14 @@ CONTEXT is the text before COMMAND on the line." (save-excursion (skip-chars-backward "^ " (comint-line-beginning-position)) (point)))) - (list start end + ;; FIXME: `gud-gdb-run-command-fetch-lines' has some nasty side-effects on + ;; the buffer (via `gud-delete-prompt-marker'): it removes the prompt and + ;; then re-adds it later, thus messing up markers and overlays along the + ;; way (bug#18282). + ;; We use an "insert-before" marker for `start', since it's typically right + ;; after the prompt, which works around the problem, but is a hack (and + ;; comes with other downsides, e.g. if completion adds text at `start'). + (list (copy-marker start t) end (completion-table-dynamic (apply-partially gud-gdb-completion-function (buffer-substring (comint-line-beginning-position) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f12486d0acb..dc38966bcaf 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1162,9 +1162,15 @@ the line will be re-indented automatically if needed." ((and (eq ?: last-command-event) (memq ?: electric-indent-chars) (not current-prefix-arg) + ;; Trigger electric colon only at end of line (eolp) + ;; Avoid re-indenting on extra colon (not (equal ?: (char-before (1- (point))))) - (not (python-syntax-comment-or-string-p))) + (not (python-syntax-comment-or-string-p)) + ;; Never re-indent at beginning of defun + (not (save-excursion + (python-nav-beginning-of-statement) + (python-info-looking-at-beginning-of-defun)))) (python-indent-line))))) diff --git a/lisp/startup.el b/lisp/startup.el index bb55080d67e..c46200a050d 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1797,7 +1797,7 @@ we put it on this frame." (let (chosen-frame) ;; MS-Windows needs this to have a chance to make the initial ;; frame visible. - (if (eq system-type 'windows-nt) + (if (eq (window-system) 'w32) (sit-for 0 t)) (dolist (frame (append (frame-list) (list (selected-frame)))) (if (and (frame-visible-p frame) diff --git a/lisp/subr.el b/lisp/subr.el index c168cf5fdb2..d085095f372 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1156,10 +1156,7 @@ and `event-end' functions." ((null spacing) (setq spacing 0))) (cons (/ (car pair) (frame-char-width frame)) - (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) - (if (null (with-current-buffer (window-buffer window) - header-line-format)) - 0 1)))))))) + (/ (cdr pair) (+ (frame-char-height frame) spacing)))))))) (defun posn-actual-col-row (position) "Return the actual column and row in POSITION, measured in characters. diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 66118d3e288..129314cbcee 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -800,8 +800,6 @@ tar-file's buffer." tarname ")")) (buffer (generate-new-buffer bufname))) - (with-current-buffer buffer - (setq buffer-undo-list t)) (with-current-buffer tar-data-buffer (let (coding) (narrow-to-region start end) @@ -829,7 +827,11 @@ tar-file's buffer." (with-current-buffer buffer (set-buffer-multibyte nil))) (widen) - (decode-coding-region start end coding buffer))) + (with-current-buffer buffer + (setq buffer-undo-list t)) + (decode-coding-region start end coding buffer) + (with-current-buffer buffer + (setq buffer-undo-list nil)))) buffer)) (defun tar-extract (&optional other-window-p) @@ -869,7 +871,6 @@ tar-file's buffer." (with-current-buffer tar-buffer default-directory)) (set-buffer-modified-p nil) - (setq buffer-undo-list t) (normal-mode) ; pick a mode. (set (make-local-variable 'tar-superior-buffer) tar-buffer) (set (make-local-variable 'tar-superior-descriptor) descriptor) diff --git a/lisp/tutorial.el b/lisp/tutorial.el index f6d4cb053ec..fcb840fcfed 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -209,10 +209,10 @@ LEFT and RIGHT are the elements to compare." (symbol-name cx))))))) (defconst tutorial--default-keys - ;; On window system, `suspend-emacs' is replaced in the default - ;; keymap + ;; On window system, `suspend-emacs' is replaced in the default keymap. (let* ((suspend-emacs 'suspend-frame) (default-keys + ;; The first few are not mentioned but are basic: `((ESC-prefix [27]) (Control-X-prefix [?\C-x]) (mode-specific-command-prefix [?\C-c]) @@ -552,7 +552,7 @@ with some explanatory links." ;; binding because the Hebrew tutorial uses directional ;; controls and Hebrew character maqaf, the Hebrew hyphen, ;; immediately before the binding string. - (concat "\\([[:space:]]\\|[[:punct:]]\\)\\(" + (concat "\\(?:[[:space:]]\\|[[:punct:]]\\)\\(" (mapconcat (lambda (kdf) (regexp-quote (tutorial--key-description (nth 1 kdf)))) |