diff options
author | Joakim Verona <joakim@verona.se> | 2012-03-25 22:04:52 +0200 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2012-03-25 22:04:52 +0200 |
commit | 75da28a3845b9dfa4e730cfa19c14edc52cbb222 (patch) | |
tree | b04519bffcb21264cbe3ce8af13df7186548667f /lisp | |
parent | b827329a89291ed68dd017c53976be7ce5ed3b22 (diff) | |
parent | f514f6f0e3f8bbeb5212d0337e5bda5a9a4eaeb5 (diff) | |
download | emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.tar.gz emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.tar.bz2 emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.zip |
upstream
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 154 | ||||
-rw-r--r-- | lisp/ChangeLog.14 | 2 | ||||
-rw-r--r-- | lisp/ChangeLog.15 | 4 | ||||
-rw-r--r-- | lisp/button.el | 4 | ||||
-rw-r--r-- | lisp/cus-theme.el | 17 | ||||
-rw-r--r-- | lisp/custom.el | 9 | ||||
-rw-r--r-- | lisp/face-remap.el | 42 | ||||
-rw-r--r-- | lisp/faces.el | 47 | ||||
-rw-r--r-- | lisp/files.el | 6 | ||||
-rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/gnus/auth-source.el | 2 | ||||
-rw-r--r-- | lisp/ido.el | 25 | ||||
-rw-r--r-- | lisp/info.el | 4 | ||||
-rw-r--r-- | lisp/international/quail.el | 35 | ||||
-rw-r--r-- | lisp/makefile.w32-in | 10 | ||||
-rw-r--r-- | lisp/mwheel.el | 9 | ||||
-rw-r--r-- | lisp/net/network-stream.el | 15 | ||||
-rw-r--r-- | lisp/newcomment.el | 2 | ||||
-rw-r--r-- | lisp/outline.el | 1 | ||||
-rw-r--r-- | lisp/progmodes/etags.el | 13 | ||||
-rw-r--r-- | lisp/progmodes/hideshow.el | 1 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 11 | ||||
-rw-r--r-- | lisp/simple.el | 3 | ||||
-rw-r--r-- | lisp/url/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/url/url-queue.el | 3 | ||||
-rw-r--r-- | lisp/vc/vc-bzr.el | 26 | ||||
-rw-r--r-- | lisp/vc/vc.el | 2 | ||||
-rw-r--r-- | lisp/wid-edit.el | 10 | ||||
-rw-r--r-- | lisp/window.el | 13 |
29 files changed, 330 insertions, 150 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed5dc39021b..5a0c33da3c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,126 @@ +2012-03-25 Eli Zaretskii <eliz@gnu.org> + + * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead + of same-dir.tst, to avoid stepping on other (parallel) Make job's + toes. + +2012-03-25 Chong Yidong <cyd@gnu.org> + + * custom.el (load-theme): Even if NO-ENABLE arg is t, reenable the + theme if it was previously enabled before (Bug#11031). + + * cus-theme.el (custom-theme-write-faces): Retrieve current face + spec with custom-face-get-current-spec if its :shown-value is not + determined yet (Bug#9337). + (customize-create-theme, custom-theme-revert): Doc fixes. + + * button.el (button-at): Minor addition to docstring. + +2012-03-24 Simon Leinen <simon.leinen@gmail.com> + + * vc/vc.el (vc-merge): Fix a prompt. + +2012-03-24 Chong Yidong <cyd@gnu.org> + + * mwheel.el (mwheel-scroll): Call deactivate-mark at the right + point (Bug#9623). + + * button.el (button-at): Minor addition to docstring. + +2012-03-23 Stefan Monnier <monnier@iro.umontreal.ca> + + * newcomment.el (comment-choose-indent): No space after BOL. + +2012-03-22 Sam Steingold <sds@gnu.org> + + * window.el (switch-to-prev-buffer): Revert last patch because the + bug turned out to be an advertised feature (Elisp manual 28.14). + +2012-03-22 Glenn Morris <rgm@gnu.org> + + * vc/vc-bzr.el (vc-bzr-status-switches): New option. (Bug#6724) + (vc-bzr-command): If running "status", pass vc-bzr-status-switches. + +2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * net/network-stream.el (network-stream-open-starttls): Make error + message under Windows be less misleading. + +2012-03-22 Liang Wang <netcasper@gmail.com> (tiny change) + + * progmodes/etags.el (etags-list-tags): Only use tags which goto-func + understands (bug#9942). + +2012-03-22 Chong Yidong <cyd@gnu.org> + + * simple.el (end-of-visible-line): Handle return value of + next-single-property-change properly (Bug#9371). + +2012-03-22 Kenichi Handa <handa@m17n.org> + + * international/quail.el (quail-insert-kbd-layout): Fix previous + change. To avoid unwanted bidi reordering, use + bidi-string-mark-left-to-right instead of inserting LRO and PDF. + +2012-03-21 Dmitry Gutov <dgutov@yandex.ru> + + * progmodes/ruby-mode.el: Don't confuse "end:" for "end" (bug#10786). + (ruby-block-end-re, ruby-delimiter, ruby-parse-partial) + (ruby-beginning-of-indent): Be more careful with the difference + between word-boundary and symbol boundary. + (ruby-mode-syntax-table): Make : a symbol constituent. + +2012-03-21 Andreas Politz <politza@fh-trier.de> + + * outline.el (outline-flag-region): Evaporate overlays (bug#10789). + +2012-03-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/etags.el (tags-completion-at-point-function): + Improve last fix. + + * files.el (move-file-to-trash): Files aren't regexps (bug#11055). + +2012-03-21 Sam Steingold <sds@gnu.org> + + * progmodes/etags.el (tags-completion-at-point-function): + Avoid the error when point is inside the pattern. + +2012-03-21 John Yates <john@yates-sheets.org> (tiny change) + + * progmodes/hideshow.el (hs-inside-comment-p): Fix hiding of first + line (Bug#10855). + +2012-03-21 Drew Adams <drew.adams@oracle.com> + + * info.el (Info-menu): Handle string value of FORK arg (Bug#10858). + +2012-03-21 Anmol Khirbat <anmol@khirbat.net> (tiny change) + + * ido.el (ido-set-current-directory, ido-read-internal) + (ido-choose-completion-string, ido-completion-help): Handle nil + value of ido-completion-buffer (Bug#11008). + +2012-03-21 Sam Steingold <sds@gnu.org> + + * window.el (switch-to-prev-buffer): Do not switch to a visible + window previous buffer, just like with the frame previous buffers. + +2012-03-21 Chong Yidong <cyd@gnu.org> + + * faces.el (make-face, make-empty-face, copy-face): + * face-remap.el (face-remap-add-relative, face-remap-set-base): + Doc fixes. + +2012-03-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * wid-edit.el (widget-complete-field): Remove (bug#11051). + (widget-complete): Remove broken use of it. + 2012-03-20 Chong Yidong <cyd@gnu.org> - * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): Use - string-width and truncate-string-width to handle arbitrary + * emacs-lisp/tabulated-list.el (tabulated-list-print-entry): + Use string-width and truncate-string-width to handle arbitrary characters. 2012-03-20 Tassilo Horn <tassilo@member.fsf.org> @@ -17,8 +136,7 @@ 2012-03-18 Leo Liu <sdl.web@gmail.com> - * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with - prefix. + * net/rcirc.el (rcirc-cmd-quit): Allow quiting all servers with prefix. 2012-03-17 Eli Zaretskii <eliz@gnu.org> @@ -48,7 +166,7 @@ (hfy-fontify-buffer): Use above handlers. (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. (hfy-face-to-css): Re-defined to be a variable. - (hfy-compile-stylesheet): Modified. Allow stylesheet to be built + (hfy-compile-stylesheet): Modify. Allow stylesheet to be built over multiple runs. This is made possible by having the caller let bind a special variable `hfy-user-sheet-assoc'. (htmlfontify-string): New defun. @@ -72,10 +190,8 @@ * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Use a limit to a call of `c-literal-limits'. (c-determine-+ve-limit): New function. - (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an - `and'. - (c-guess-basic-syntax): In macros, restrict a search limit to - 2000. + (c-at-macro-vsemi-p): Move `c-in-literal' to the bottom of an `and'. + (c-guess-basic-syntax): In macros, restrict a search limit to 2000. In CASE 5B, restrict a search limit to 500. (c-just-after-func-arglist-p): Obviouly wrong `or' -> `and'. @@ -89,7 +205,7 @@ 2012-03-16 Aaron S. Hawley <Aaron.S.Hawley@gmail.com> * tar-mode.el (tar-mode): Fix saving by conditionally undoing - `special-mode' setting of `buffer-read-only'. (Bug#11010) + `special-mode' setting of `buffer-read-only'. (Bug#11010) 2012-03-16 Glenn Morris <rgm@gnu.org> @@ -156,8 +272,7 @@ 2012-03-12 Leo Liu <sdl.web@gmail.com> - * simple.el (kill-new): Use equal-including-properties for - comparison. + * simple.el (kill-new): Use equal-including-properties for comparison. (kill-do-not-save-duplicates): Doc fix. 2012-03-12 Stefan Monnier <monnier@iro.umontreal.ca> @@ -239,8 +354,7 @@ * net/mairix.el (mairix-replace-invalid-chars): Rename from mairix-replace-illegal-chars; all callers changed. Don't remove - ^, ~, and = characters: they are meaningful in mairix search - specs. + ^, ~, and = characters: they are meaningful in mairix search specs. (mairix-widget-create-query): Add usage information about mairix search forms: negating words, searching for substrings, etc. @@ -425,8 +539,7 @@ 2012-03-04 Chong Yidong <cyd@gnu.org> - * cus-start.el: Make x-select-enable-clipboard-manager - customizable. + * cus-start.el: Make x-select-enable-clipboard-manager customizable. 2012-03-04 Glenn Morris <rgm@gnu.org> @@ -557,7 +670,7 @@ (font-lock-default-function): Move the check for a specification to font-lock-spec-present. - * font-lock.el (font-lock-initial-fontify): call ... + * font-lock.el (font-lock-initial-fontify): Call ... (font-lock-spec-present): New function. 2012-02-26 Jim Blandy <jimb@red-bean.com> @@ -886,8 +999,7 @@ 2012-02-12 Teodor Zlatanov <tzz@lifelogs.com> - * net/gnutls.el (gnutls-algorithm-priority): Add missing :group - tag. + * net/gnutls.el (gnutls-algorithm-priority): Add missing :group tag. 2012-02-12 Alan Mackenzie <acm@muc.de> @@ -1060,8 +1172,8 @@ * progmodes/cc-guess.el (c-guess-offset-threshold, c-guess-region-max): Add :version tags. - * progmodes/compile.el (compilation-first-column) - (compilation-error-screen-columns, compilation-filter-start): Doc fixes. + * progmodes/compile.el (compilation-error-screen-columns) + (compilation-first-column, compilation-filter-start): Doc fixes. * vc/log-view.el (log-view-toggle-entry-display): * vc/vc.el (vc-merge, vc-pull): Doc fixes. diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index 254e2863889..be50fc46672 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -7114,7 +7114,7 @@ vc-default-mark-resolved. (vc-default-mark-resolved): Change to an alias for ignore. -2008-09-24 Andreas Politz <politza@fh-trier.de> (tiny change) +2008-09-24 Andreas Politz <politza@fh-trier.de> * term.el (term-emulate-terminal): Encode input string before checking its length. diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15 index bf7a24a5b67..e3890b80ec4 100644 --- a/lisp/ChangeLog.15 +++ b/lisp/ChangeLog.15 @@ -14934,7 +14934,7 @@ * woman.el (woman-make-bufname): Handle man-pages with "." in the name. (Bug#5038) -2009-12-02 Andreas Politz <politza@fh-trier.de> (tiny change) +2009-12-02 Andreas Politz <politza@fh-trier.de> * ido.el (ido-file-internal): Handle filenames at point that do not have a directory part. (Bug#5049) @@ -19488,7 +19488,7 @@ (elint-log-message): Add optional argument. Use elint-output. (elint-set-mode-line): New function. -2009-09-12 Andreas Politz <politza@fh-trier.de> (tiny change) +2009-09-12 Andreas Politz <politza@fh-trier.de> * emacs-lisp/elp.el (elp-not-profilable): Add more functions (Bug#4233). diff --git a/lisp/button.el b/lisp/button.el index 07c98e668bd..3cf38fa64c6 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -349,7 +349,9 @@ Also see `make-text-button'." ;; Finding buttons in a buffer (defun button-at (pos) - "Return the button at position POS in the current buffer, or nil." + "Return the button at position POS in the current buffer, or nil. +If the button at POS is a text property button, the return value +is a marker pointing to POS." (let ((button (get-char-property pos 'button))) (if (or (overlayp button) (null button)) button diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 79799049378..606033f915c 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -81,7 +81,9 @@ Do not call this mode function yourself. It is meant for internal use." (defun customize-create-theme (&optional theme buffer) "Create or edit a custom theme. THEME, if non-nil, should be an existing theme to edit. If THEME -is `user', provide an option to remove these as custom settings. +is `user', the resulting *Custom Theme* buffer also contains a +checkbox for removing the theme settings specified in the buffer +from the Custom save file. BUFFER, if non-nil, should be a buffer to use; the default is named *Custom Theme*." (interactive) @@ -209,6 +211,8 @@ remove them from your saved Custom file.\n\n")) (message ""))) (defun custom-theme-revert (_ignore-auto noconfirm) + "Revert the current *Custom Theme* buffer. +This is the `revert-buffer-function' for `custom-new-theme-mode'." (when (or noconfirm (y-or-n-p "Discard current changes? ")) (customize-create-theme custom-theme--save-name (current-buffer)))) @@ -437,14 +441,17 @@ It includes all faces in list FACES." (princ theme) (princ "\n") (dolist (spec faces) + ;; Insert the face iff the checkbox widget is checked. (when (widget-get (nth 1 spec) :value) (let* ((symbol (nth 0 spec)) (widget (nth 2 spec)) (value - (if (car-safe (widget-get widget :children)) - (custom-face-widget-to-spec widget) - ;; Child is null if the widget is closed (hidden). - (widget-get widget :shown-value)))) + (cond + ((car-safe (widget-get widget :children)) + (custom-face-widget-to-spec widget)) + ;; Child is null if the widget is closed (hidden). + ((widget-get widget :shown-value)) + (t (custom-face-get-current-spec symbol))))) (when (and (facep symbol) value) (princ (if (bolp) " '(" "\n '(")) (prin1 symbol) diff --git a/lisp/custom.el b/lisp/custom.el index 2f17ad36da0..bffd30bff21 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1143,8 +1143,9 @@ prompt the user for confirmation before loading it. But if optional arg NO-CONFIRM is non-nil, load the theme without prompting. -Normally, this function also enables THEME; if optional arg -NO-ENABLE is non-nil, load the theme but don't enable it. +Normally, this function also enables THEME. If optional arg +NO-ENABLE is non-nil, load the theme but don't enable it, unless +the theme was already enabled. This function is normally called through Customize when setting `custom-enabled-themes'. If used directly in your init file, it @@ -1160,6 +1161,10 @@ Return t if THEME was successfully loaded, nil otherwise." nil nil)) (unless (custom-theme-name-valid-p theme) (error "Invalid theme name `%s'" theme)) + ;; If THEME is already enabled, re-enable it after loading, even if + ;; NO-ENABLE is t. + (if no-enable + (setq no-enable (not (custom-theme-enabled-p theme)))) ;; If reloading, clear out the old theme settings. (when (custom-theme-p theme) (disable-theme theme) diff --git a/lisp/face-remap.el b/lisp/face-remap.el index 3af9e31a6f7..ca7a28328f9 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el @@ -106,21 +106,20 @@ The list structure of ENTRY may be destructively modified." ;;;###autoload (defun face-remap-add-relative (face &rest specs) "Add a face remapping entry of FACE to SPECS in the current buffer. - -Return a cookie which can be used to delete the remapping with +Return a cookie which can be used to delete this remapping with `face-remap-remove-relative'. -SPECS can be any value suitable for the `face' text property, -including a face name, a list of face names, or a face-attribute -property list. The attributes given by SPECS will be merged with -any other currently active face remappings of FACE, and with the -global definition of FACE. An attempt is made to sort multiple -entries so that entries with relative face-attributes are applied -after entries with absolute face-attributes. - -The base (lowest priority) remapping may be set to a specific -value, instead of the default of the global face definition, -using `face-remap-set-base'." +The remaining arguments, SPECS, should be either a list of face +names, or a property list of face attribute/value pairs. The +remapping specified by SPECS takes effect alongside the +remappings from other calls to `face-remap-add-relative', as well +as the normal definition of FACE (at lowest priority). This +function tries to sort multiple remappings for the same face, so +that remappings specifying relative face attributes are applied +after remappings specifying absolute face attributes. + +The base (lowest priority) remapping may be set to something +other than the normal definition of FACE via `face-remap-set-base'." (while (and (consp specs) (null (cdr specs))) (setq specs (car specs))) (make-local-variable 'face-remapping-alist) @@ -148,7 +147,9 @@ COOKIE should be the return value from that function." ;;;###autoload (defun face-remap-reset-base (face) - "Set the base remapping of FACE to inherit from FACE's global definition." + "Set the base remapping of FACE to the normal definition of FACE. +This causes the remappings specified by `face-remap-add-relative' +to apply on top of the normal definition of FACE." (let ((entry (assq face face-remapping-alist))) (when entry ;; If there's nothing except a base remapping, we simply remove @@ -163,10 +164,15 @@ COOKIE should be the return value from that function." ;;;###autoload (defun face-remap-set-base (face &rest specs) "Set the base remapping of FACE in the current buffer to SPECS. -If SPECS is empty, the default base remapping is restored, which -inherits from the global definition of FACE; note that this is -different from SPECS containing a single value `nil', which does -not inherit from the global definition of FACE." +This causes the remappings specified by `face-remap-add-relative' +to apply on top of the face specification given by SPECS. SPECS +should be either a list of face names, or a property list of face +attribute/value pairs. + +If SPECS is empty, call `face-remap-reset-base' to use the normal +definition of FACE as the base remapping; note that this is +different from SPECS containing a single value `nil', which means +not to inherit from the global definition of FACE at all." (while (and (consp specs) (not (null (car specs))) (null (cdr specs))) (setq specs (car specs))) (if (or (null specs) diff --git a/lisp/faces.el b/lisp/faces.el index 34fad66ce27..0256f8d951a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -122,15 +122,13 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc." "Return a list of all defined faces." (mapcar #'car face-new-frame-defaults)) - -;;; ### If not frame-local initialize by what X resources? - (defun make-face (face &optional no-init-from-resources) "Define a new face with name FACE, a symbol. -NO-INIT-FROM-RESOURCES non-nil means don't initialize frame-local -variants of FACE from X resources. (X resources recognized are found -in the global variable `face-x-resources'.) If FACE is already known -as a face, leave it unmodified. Value is FACE." +Do not call this directly from Lisp code; use `defface' instead. + +If NO-INIT-FROM-RESOURCES is non-nil, don't initialize face +attributes from X resources. If FACE is already known as a face, +leave it unmodified. Return FACE." (interactive (list (read-from-minibuffer "Make face: " nil nil t 'face-name-history))) (unless (facep face) @@ -145,31 +143,30 @@ as a face, leave it unmodified. Value is FACE." (make-face-x-resource-internal face))) face) - (defun make-empty-face (face) "Define a new, empty face with name FACE. -If the face already exists, it is left unmodified. Value is FACE." +Do not call this directly from Lisp code; use `defface' instead." (interactive (list (read-from-minibuffer "Make empty face: " nil nil t 'face-name-history))) (make-face face 'no-init-from-resources)) - (defun copy-face (old-face new-face &optional frame new-frame) - "Define a face just like OLD-FACE, with name NEW-FACE. - -If NEW-FACE already exists as a face, it is modified to be like -OLD-FACE. If it doesn't already exist, it is created. - -If the optional argument FRAME is given as a frame, NEW-FACE is -changed on FRAME only. -If FRAME is t, the frame-independent default specification for OLD-FACE -is copied to NEW-FACE. -If FRAME is nil, copying is done for the frame-independent defaults -and for each existing frame. - -If the optional fourth argument NEW-FRAME is given, -copy the information from face OLD-FACE on frame FRAME -to NEW-FACE on frame NEW-FRAME. In this case, FRAME may not be nil." + "Define a face named NEW-FACE, which is a copy of OLD-FACE. +This function does not copy face customization data, so NEW-FACE +will not be made customizable. Most Lisp code should not call +this function; use `defface' with :inherit instead. + +If NEW-FACE already exists as a face, modify it to be like +OLD-FACE. If NEW-FACE doesn't already exist, create it. + +If the optional argument FRAME is a frame, change NEW-FACE on +FRAME only. If FRAME is t, copy the frame-independent default +specification for OLD-FACE to NEW-FACE. If FRAME is nil, copy +the defaults as well as the faces on each existing frame. + +If the optional fourth argument NEW-FRAME is given, copy the +information from face OLD-FACE on frame FRAME to NEW-FACE on +frame NEW-FRAME. In this case, FRAME must not be nil." (let ((inhibit-quit t)) (if (null frame) (progn diff --git a/lisp/files.el b/lisp/files.el index cde15c5d0b1..8c61c288be9 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6563,7 +6563,7 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, (new-fn (expand-file-name (file-name-nondirectory fn) trash-dir))) ;; We can't trash a parent directory of trash-directory. - (if (string-match fn trash-dir) + (if (string-prefix-p fn trash-dir) (error "Trash directory `%s' is a subdirectory of `%s'" trash-dir filename)) (unless (file-directory-p trash-dir) @@ -6595,10 +6595,10 @@ Otherwise, trash FILENAME using the freedesktop.org conventions, (file-name-directory fn))) (error "Cannot move %s to trash: Permission denied" filename)) ;; The trashed file cannot be the trash dir or its parent. - (if (string-match fn trash-files-dir) + (if (string-prefix-p fn trash-files-dir) (error "The trash directory %s is a subdirectory of %s" trash-files-dir filename)) - (if (string-match fn trash-info-dir) + (if (string-prefix-p fn trash-info-dir) (error "The trash directory %s is a subdirectory of %s" trash-info-dir filename)) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 878b9b9eb6b..ef0f1c5c852 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2012-03-22 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * auth-source.el (auth-source-netrc-create): Quote tokens that contain + "#" to avoid having them interpreted as comments. + 2012-03-19 Lars Magne Ingebrigtsen <larsi@gnus.org> * shr.el (shr-insert): Update the text state properly to avoid diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 80a3b91b60a..34fe5afe7af 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1293,7 +1293,7 @@ See `auth-source-search' for details on SPEC." (secret "password") (port "port") ; redundant but clearer (t (symbol-name r))) - (if (string-match "[\" ]" data) + (if (string-match "[\"# ]" data) (format "%S" data) data))))) (setq add (concat add (funcall printer))))))) diff --git a/lisp/ido.el b/lisp/ido.el index 5813aff0f21..dcaa8f373ce 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1722,8 +1722,9 @@ This function also adds a hook to the minibuffer." (unless (and ido-enable-tramp-completion (string-match "\\`/[^/]*@\\'" dir)) (setq dir (ido-final-slash dir t)))) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (cond ((equal dir ido-current-directory) nil) @@ -1736,8 +1737,9 @@ This function also adds a hook to the minibuffer." (t (ido-trace "cd" dir) (setq ido-current-directory dir) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) (setq ido-directory-too-big (and (not ido-directory-nonreadable) (ido-directory-too-big-p dir))) @@ -1982,8 +1984,9 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-text-init nil)) ido-completion-map nil hist)))) (ido-trace "read-from-minibuffer" ido-final-text) - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (ido-trace "\n_EXIT_" ido-exit) @@ -3837,8 +3840,9 @@ This is to make them appear as if they were \"virtual buffers\"." (defun ido-choose-completion-string (choice &rest ignored) (when (ido-active) ;; Insert the completion into the buffer where completion was requested. - (if (get-buffer ido-completion-buffer) - (kill-buffer ido-completion-buffer)) + (and ido-completion-buffer + (get-buffer ido-completion-buffer) + (kill-buffer ido-completion-buffer)) (cond ((ido-active t) ;; ido-use-merged-list (setq ido-current-directory "" @@ -3857,7 +3861,8 @@ This is to make them appear as if they were \"virtual buffers\"." "Show possible completions in a *File Completions* buffer." (interactive) (setq ido-rescan nil) - (let ((temp-buf (get-buffer ido-completion-buffer)) + (let ((temp-buf (and ido-completion-buffer + (get-buffer ido-completion-buffer))) display-it full-list) (if (and (eq last-command this-command) temp-buf) ;; scroll buffer @@ -3876,7 +3881,7 @@ This is to make them appear as if they were \"virtual buffers\"." (scroll-other-window)) (set-buffer buf)) (setq display-it t)) - (if display-it + (if (and ido-completion-buffer display-it) (with-output-to-temp-buffer ido-completion-buffer (let ((completion-list (sort (cond diff --git a/lisp/info.el b/lisp/info.el index b7e2d1eedbe..042ff158362 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -2594,7 +2594,9 @@ new buffer." (list item current-prefix-arg)))) ;; there is a problem here in that if several menu items have the same ;; name you can only go to the node of the first with this command. - (Info-goto-node (Info-extract-menu-item menu-item) (if fork menu-item))) + (Info-goto-node (Info-extract-menu-item menu-item) + (and fork + (if (stringp fork) fork menu-item)))) (defun Info-extract-menu-item (menu-item) (setq menu-item (regexp-quote menu-item)) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index e0e6bfd465b..70e6d4b69cb 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -825,8 +825,6 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (setq i 0) (while (< i quail-keyboard-layout-len) (when (= (% i 30) 0) - ;; Insert LRO to avoid bidi-reordering of keyboard cells. - (insert (propertize (string ?\x202d) 'invisible t)) (setq row (/ i 30)) (if (> row 1) (insert-char 32 (+ row (/ (- row 2) 2))))) @@ -835,25 +833,26 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (insert bar) (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) (insert " ")) - (if (and (characterp lower) - (eq (get-char-code-property lower 'general-category) 'Mn)) - ;; Pad the left and right of non-spacing characters. - (setq lower (compose-string (string lower) 0 1 - (format "\t%c\t" lower)))) - (if (and (characterp upper) - (eq (get-char-code-property upper 'general-category) 'Mn)) - ;; Pad the left and right of non-spacing characters. - (setq upper (compose-string (string upper) 0 1 - (format "\t%c\t" upper)))) - (insert lower (propertize " " 'invisible t) upper) - (if (< (if (stringp upper) (string-width upper) (char-width upper)) 2) + (if (characterp lower) + (if (eq (get-char-code-property lower 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (setq lower (compose-string (string lower) 0 1 + (format "\t%c\t" lower))) + (setq lower (string lower)))) + (if (characterp upper) + (if (eq (get-char-code-property upper 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (setq upper (compose-string (string upper) 0 1 + (format "\t%c\t" upper))) + (setq upper (string upper)))) + (insert (bidi-string-mark-left-to-right lower) + (propertize " " 'invisible t) + (bidi-string-mark-left-to-right upper)) + (if (< (string-width upper) 2) (insert " ")) (setq i (+ i 2)) (if (= (% i 30) 0) - (insert bar - ;; Insert PDF to deny the previously inserted LRO. - (propertize (string ?\x202c) 'invisible t) - "\n"))) + (insert bar "\n"))) ;; Insert horizontal lines while deleting blank key columns at the ;; beginning and end of each line. (save-restriction diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 33c87778dfd..7907c5f10ce 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -510,9 +510,9 @@ bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps # install: - mkdir "$(INSTALL_DIR)/lisp" - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" - echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" + echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" #ifdef COPY_LISP_SOURCE $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF) #else @@ -528,8 +528,8 @@ install: # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) #endif - - $(DEL) ../same-dir.tst - - $(DEL) "$(INSTALL_DIR)/same-dir.tst" + - $(DEL) ../$(DIRNAME)_same-dir.tst + - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst" # Need to copy *.el files first, to avoid "source file is newer" annoyance # since cp does not preserve time stamps diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 7b507664712..1c2028ed02e 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -232,12 +232,17 @@ This should only be bound to mouse buttons 4 and 5." (end-of-buffer (while t (funcall mwheel-scroll-up-function))))) (t (error "Bad binding in mwheel-scroll")))) (if curwin (select-window curwin))) - ;; If there is a temporarily active region, deactivate it iff + ;; If there is a temporarily active region, deactivate it if ;; scrolling moves point. (when opoint (with-current-buffer buffer (when (/= opoint (point)) - (deactivate-mark))))) + ;; Call `deactivate-mark' at the original position, so that + ;; the original region is saved to the X selection. + (let ((newpoint (point))) + (goto-char opoint) + (deactivate-mark) + (goto-char newpoint)))))) (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time) (if mwheel-inhibit-click-event-timer (cancel-timer mwheel-inhibit-click-event-timer) diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 8730e875ea0..7a3d47ef1d1 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -302,11 +302,16 @@ functionality. (if (or (null starttls-command) starttls-available) "Server does not support TLS" - (concat "Emacs does not support TLS, and no external `" - (if starttls-use-gnutls - starttls-gnutls-program - starttls-program) - "' program was found"))) + ;; See `starttls-available-p'. If this predicate + ;; changes to allow running under Windows, the error + ;; message below should be amended. + (if (memq system-type '(windows-nt ms-dos)) + (concat "Emacs does not support TLS") + (concat "Emacs does not support TLS, and no external `" + (if starttls-use-gnutls + starttls-gnutls-program + starttls-program) + "' program was found")))) (delete-process stream) (setq stream nil)) ;; Return value: diff --git a/lisp/newcomment.el b/lisp/newcomment.el index ddb6c71d1a6..40bb36daf45 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -587,7 +587,7 @@ Point is expected to be at the start of the comment." (save-excursion (end-of-line) (current-column))))) (other nil) (min (save-excursion (skip-chars-backward " \t") - (1+ (current-column))))) + (if (bolp) 0 (1+ (current-column)))))) ;; Fix up the range. (if (< max min) (setq max min)) ;; Don't move past the fill column. diff --git a/lisp/outline.el b/lisp/outline.el index 15af855ff43..da5519f95eb 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -751,6 +751,7 @@ If FLAG is nil then text is shown, while if FLAG is t the text is hidden." ;; very end of the heading, before the newline, so text inserted at FROM ;; belongs to the heading rather than to the entry. (let ((o (make-overlay from to nil 'front-advance))) + (overlay-put o 'evaporate t) (overlay-put o 'invisible 'outline) (overlay-put o 'isearch-open-invisible (or outline-isearch-open-invisible-function diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index cc5f0fef934..6bb86738df0 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -809,10 +809,11 @@ If no tags table is loaded, do nothing and return nil." beg) (when pattern (save-excursion - (search-backward pattern) ;FIXME: will fail if we're inside pattern. - (setq beg (point)) - (forward-char (length pattern)) - (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) + (forward-char (1- (length pattern))) + (search-backward pattern) + (setq beg (point)) + (forward-char (length pattern)) + (list beg (point) (tags-lazy-completion-table) :exclusive 'no)))))) (defun find-tag-tag (string) "Read a tag name, with defaulting and completion." @@ -1409,7 +1410,9 @@ hits the start of file." tag tag-info pt) (forward-line 1) (while (not (or (eobp) (looking-at "\f"))) - (setq tag-info (save-excursion (funcall snarf-tag-function t)) + ;; We used to use explicit tags when available, but the current goto-func + ;; can only handle implicit tags. + (setq tag-info (save-excursion (funcall snarf-tag-function nil)) tag (car tag-info) pt (with-current-buffer standard-output (point))) (princ tag) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 104a8f96727..26db60ddbc2 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -607,6 +607,7 @@ as cdr." ;; forward comment, and see if we are inside, then extend ;; forward and backward as long as we have comments (let ((q (point))) + (skip-chars-forward "[:blank:]") (when (or (looking-at hs-c-start-regexp) (re-search-backward hs-c-start-regexp (point-min) t)) ;; first get to the beginning of this comment... diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index bf264972940..66aa256f947 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -96,7 +96,7 @@ (regexp-opt (append ruby-modifier-beg-keywords ruby-block-op-keywords)) "Regexp to match hanging block modifiers.") -(defconst ruby-block-end-re "\\<end\\>") +(defconst ruby-block-end-re "\\_<end\\_>") (eval-and-compile (defconst ruby-here-doc-beg-re @@ -115,9 +115,9 @@ This should only be called after matching against `ruby-here-doc-beg-re'." (match-string 6))))) (defconst ruby-delimiter - (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\(" + (concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\_<\\(" ruby-block-beg-re - "\\)\\>\\|" ruby-block-end-re + "\\)\\_>\\|" ruby-block-end-re "\\|^=begin\\|" ruby-here-doc-beg-re)) (defconst ruby-negative @@ -166,6 +166,7 @@ This should only be called after matching against `ruby-here-doc-beg-re'." (modify-syntax-entry ?$ "." table) (modify-syntax-entry ?? "_" table) (modify-syntax-entry ?_ "_" table) + (modify-syntax-entry ?: "_" table) (modify-syntax-entry ?< "." table) (modify-syntax-entry ?> "." table) (modify-syntax-entry ?& "." table) @@ -565,7 +566,7 @@ and `\\' when preceded by `?'." (setq nest (cons (cons nil pnt) nest)) (setq depth (1+ depth)))) (goto-char (match-end 0))) - ((looking-at (concat "\\<\\(" ruby-block-beg-re "\\)\\>")) + ((looking-at (concat "\\_<\\(" ruby-block-beg-re "\\)\\_>")) (and (save-match-data (or (not (looking-at (concat "do" ruby-keyword-end-re))) @@ -864,7 +865,7 @@ move backward." ;; It seems like it should move to the line where indentation should deepen, ;; but ruby-indent-beg-re only accounts for whitespace before class, module and def, ;; so this will only match other block beginners at the beginning of the line. - (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\b") nil 'move) + (and (re-search-backward (concat "^\\(" ruby-indent-beg-re "\\)\\_>") nil 'move) (beginning-of-line))) (defun ruby-move-to-block (n) diff --git a/lisp/simple.el b/lisp/simple.el index 936037f5caa..8b04534455d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3688,7 +3688,8 @@ If ARG is zero, move to the beginning of the current line." (assq prop buffer-invisibility-spec)))))) (skip-chars-forward "^\n") (if (get-text-property (point) 'invisible) - (goto-char (next-single-property-change (point) 'invisible)) + (goto-char (or (next-single-property-change (point) 'invisible) + (point-max))) (goto-char (next-overlay-change (point)))) (end-of-line))) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index ff6a6e6f805..d6e25188c69 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2012-03-25 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * url-queue.el (url-queue-kill-job): Check whether the buffer has + been killed asynchronously before selecting it. + 2012-03-14 Lars Magne Ingebrigtsen <larsi@gnus.org> * url-queue.el (url-queue-kill-job): Make sure that the callback diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 46124717fed..917c787df29 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -160,7 +160,8 @@ The variable `url-queue-timeout' sets a timeout." ;; Call the callback with an error message to ensure that the caller ;; is notified that the job has failed. (with-current-buffer - (if (bufferp (url-queue-buffer job)) + (if (and (bufferp (url-queue-buffer job)) + (buffer-live-p (url-queue-buffer job))) ;; Use the (partially filled) process buffer it it exists. (url-queue-buffer job) ;; If not, just create a new buffer, which will probably be diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 9f35fc8f035..798131236d5 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -89,18 +89,40 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :group 'vc-bzr) +(defcustom vc-bzr-status-switches + (ignore-errors + (with-temp-buffer + (call-process vc-bzr-program nil t nil "help" "status") + (if (search-backward "--no-classify" nil t) + "--no-classify"))) + "String or list of strings specifying switches for bzr status under VC. +The option \"--no-classify\" should be present if your bzr supports it." + :type '(choice (const :tag "None" nil) + (string :tag "Argument String") + (repeat :tag "Argument List" :value ("") string)) + :group 'vc-bzr + :version "24.1") + ;; since v0.9, bzr supports removing the progress indicators ;; by setting environment variable BZR_PROGRESS_BAR to "none". (defun vc-bzr-command (bzr-command buffer okstatus file-or-list &rest args) "Wrapper round `vc-do-command' using `vc-bzr-program' as COMMAND. Invoke the bzr command adding `BZR_PROGRESS_BAR=none' and -`LC_MESSAGES=C' to the environment." +`LC_MESSAGES=C' to the environment. If BZR-COMMAND is \"status\", +prepends `vc-bzr-status-switches' to ARGS." (let ((process-environment (list* "BZR_PROGRESS_BAR=none" ; Suppress progress output (bzr >=0.9) "LC_MESSAGES=C" ; Force English output process-environment))) (apply 'vc-do-command (or buffer "*vc*") okstatus vc-bzr-program - file-or-list bzr-command args))) + file-or-list bzr-command + (if (and (string-equal "status" bzr-command) + vc-bzr-status-switches) + (append (if (stringp vc-bzr-status-switches) + (list vc-bzr-status-switches) + vc-bzr-status-switches) + args) + args)))) (defun vc-bzr-async-command (bzr-command &rest args) "Wrapper round `vc-do-async-command' using `vc-bzr-program' as COMMAND. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index e1141cb392d..4cbbf47c2d6 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1922,7 +1922,7 @@ changes from the current branch." (setq first-revision (vc-read-revision (concat "Merge " file - "from branch or revision " + " from branch or revision " "(default news on current branch): ") (list file) backend)) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 61bb4db558c..b6feecebde5 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1141,12 +1141,6 @@ the field." (kill-region (point) end) (call-interactively 'kill-line)))) -(defcustom widget-complete-field (lookup-key global-map "\M-\t") - "Default function to call for completion inside fields." - :options '(ispell-complete-word complete-tag lisp-complete-symbol) - :type 'function - :group 'widgets) - (defun widget-narrow-to-field () "Narrow to field." (interactive) @@ -1169,10 +1163,6 @@ When not inside a field, signal an error." (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) (plist-get completion-extra-properties :predicate)))) - ((widget-field-find (point)) - ;; This defaulting used to be performed in widget-default-complete, but - ;; it seems more appropriate here than in widget-default-completions. - (call-interactively 'widget-complete-field)) (t (error "Not in an editable field"))))) ;; We may want to use widget completion in buffers where the major mode diff --git a/lisp/window.el b/lisp/window.el index f79041e0e6c..cb7368fc7ff 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2600,11 +2600,16 @@ shall not be switched to in future invocations of this command." (not (setq killed-buffers (cons new-buffer killed-buffers)))) (not (eq new-buffer old-buffer)) - (or bury-or-kill + (or bury-or-kill (not (memq new-buffer next-buffers)))) - (set-window-buffer-start-and-point - window new-buffer (nth 1 entry) (nth 2 entry)) - (throw 'found t))) + ;; _DO_ show visible buffers as advertized in Elisp manual 28.14 + ;; on `switch-to-prev-buffer' & `switch-to-next-buffer' + ;;(if (get-buffer-window new-buffer) + ;; ;; Try to avoid showing a buffer visible in some other window. + ;; (setq visible new-buffer) + (set-window-buffer-start-and-point + window new-buffer (nth 1 entry) (nth 2 entry)) + (throw 'found t))) ;; Scan reverted buffer list of WINDOW's frame next, skipping ;; entries of next buffers. Note that when we bury or kill a ;; buffer we don't reverse the global buffer list to avoid showing |