diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e2de4e75afa..2b88017fc5b 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,12 @@ +2012-10-20 Eli Zaretskii + + Prevent silent omission of doc strings from uncompile Lisp files. + * make-docfile.c (scan_lisp_file): Barf if called with a .el file + other than one of a small list of supported un-compiled files. + + * makefile.w32-in (lisp1, lisp2): Name .elc files wherever they + exist. (Bug#12395) + 2012-10-17 Eli Zaretskii * ntlib.c: Include , to avoid compiler warning about diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 411b7057861..555a563d748 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c @@ -1025,9 +1025,9 @@ scan_c_file (char *filename, const char *mode) arglist, but the doc string must still have a backslash and newline immediately after the double quote. The only source files that must follow this convention are preloaded - uncompiled ones like loaddefs.el and bindings.el; aside - from that, it is always the .elc file that we look at, and they are no - problem because byte-compiler output follows this convention. + uncompiled ones like loaddefs.el; aside from that, it is always the .elc + file that we should look at, and they are no problem because byte-compiler + output follows this convention. The NAME and DOCSTRING are output. NAME is preceded by `F' for a function or `V' for a variable. An entry is output only if DOCSTRING has \ newline just after the opening ". @@ -1104,9 +1104,36 @@ scan_lisp_file (const char *filename, const char *mode) FILE *infile; register int c; char *saved_string = 0; + /* These are the only files that are loaded uncompiled, and must + follow the conventions of the doc strings expected by this + function. These conventions are automatically followed by the + byte compiler when it produces the .elc files. */ + static struct { + const char *fn; + size_t fl; + } uncompiled[] = { + { "loaddefs.el", sizeof("loaddefs.el") - 1 }, + { "loadup.el", sizeof("loadup.el") - 1 }, + { "charprop.el", sizeof("charprop.el") - 1 } + }; + int i, match; + size_t flen = strlen (filename); if (generate_globals) fatal ("scanning lisp file when -g specified", 0); + if (!strcmp (filename + flen - 3, ".el")) + { + for (i = 0, match = 0; i < sizeof(uncompiled)/sizeof(uncompiled[0]); i++) + { + if (!strcmp (filename + flen - uncompiled[i].fl, uncompiled[i].fn)) + { + match = 1; + break; + } + } + if (!match) + fatal ("uncompiled lisp file %s is not supported", filename); + } infile = fopen (filename, mode); if (infile == NULL) diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 9da61cd5255..8e685adf9da 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -209,38 +209,38 @@ lisp1= \ $(lispsource)emacs-lisp/map-ynp.elc \ $(lispsource)menu-bar.elc \ $(lispsource)international/mule.elc \ - $(lispsource)international/mule-conf.el \ + $(lispsource)international/mule-conf.elc \ $(lispsource)international/mule-cmds.elc \ $(lispsource)international/characters.elc \ $(lispsource)international/charprop.el \ $(lispsource)case-table.elc lisp2 = \ - $(lispsource)language/chinese.el \ - $(lispsource)language/cyrillic.el \ - $(lispsource)language/indian.el \ - $(lispsource)language/sinhala.el \ - $(lispsource)language/english.el \ + $(lispsource)language/chinese.elc \ + $(lispsource)language/cyrillic.elc \ + $(lispsource)language/indian.elc \ + $(lispsource)language/sinhala.elc \ + $(lispsource)language/english.elc \ $(lispsource)language/ethiopic.elc \ $(lispsource)language/european.elc \ - $(lispsource)language/czech.el \ - $(lispsource)language/slovak.el \ - $(lispsource)language/romanian.el \ - $(lispsource)language/greek.el \ + $(lispsource)language/czech.elc \ + $(lispsource)language/slovak.elc \ + $(lispsource)language/romanian.elc \ + $(lispsource)language/greek.elc \ $(lispsource)language/hebrew.elc \ - $(lispsource)language/japanese.el \ - $(lispsource)language/korean.el \ - $(lispsource)language/lao.el \ - $(lispsource)language/cham.el \ - $(lispsource)language/tai-viet.el \ - $(lispsource)language/thai.el \ + $(lispsource)language/japanese.elc \ + $(lispsource)language/korean.elc \ + $(lispsource)language/lao.elc \ + $(lispsource)language/cham.elc \ + $(lispsource)language/tai-viet.elc \ + $(lispsource)language/thai.elc \ $(lispsource)language/tibetan.elc \ - $(lispsource)language/vietnamese.el \ - $(lispsource)language/misc-lang.el \ - $(lispsource)language/utf-8-lang.el \ - $(lispsource)language/georgian.el \ - $(lispsource)language/khmer.el \ - $(lispsource)language/burmese.el \ + $(lispsource)language/vietnamese.elc \ + $(lispsource)language/misc-lang.elc \ + $(lispsource)language/utf-8-lang.elc \ + $(lispsource)language/georgian.elc \ + $(lispsource)language/khmer.elc \ + $(lispsource)language/burmese.elc \ $(lispsource)register.elc \ $(lispsource)replace.elc \ $(lispsource)simple.elc \ @@ -266,7 +266,7 @@ lisp2 = \ $(WINDOW_SUPPORT) \ $(lispsource)widget.elc \ $(lispsource)window.elc \ - $(lispsource)version.el + $(lispsource)version.elc # This is needed the first time we build the tree, since temacs.exe # does not exist yet, and the DOC rule needs it to rebuild DOC whenever diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 86b425b41e4..41b0135a708 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,42 @@ +2012-10-20 Arne Jørgensen + + * progmodes/flymake.el (flymake-create-temp-inplace): Use + file-truename. + +2012-10-20 Eli Zaretskii + + * loadup.el: Update comment about uncompiled Lisp files. (Bug#12395) + +2012-10-20 Jay Belanger + + * calc/calc-units.el (math-extract-units): Properly extract powers + of units. + +2012-10-20 Daniel Colascione + + * frame.el (make-frame): Set x-display-name as we used to in order + to unbreak creating an X11 frame from an Emacs daemon started + without a display. + +2012-10-19 Stefan Monnier + + * minibuffer.el (minibuffer-force-complete): Make the next completion use + the same completion-field (bug@12221). + +2012-10-19 Martin Rudalics + + * emacs-lisp/debug.el (debug): Record height of debugger window + also when debugger will be back (Bug#8789). + +2012-10-18 Chong Yidong + + * progmodes/gdb-mi.el (gdb-display-buffer-other-frame-action): + Convert to defcustom. + (gdb-get-source-file): Don't bind pop-up-windows. + + * progmodes/gud.el (gud-display-line): Don't specially re-use + other frames for the gdb-mi case (Bug#12648). + 2012-10-18 Stefan Monnier * emacs-lisp/advice.el: Clean up commentary a bit. diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 39f710f8322..58646ea114c 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1481,10 +1481,16 @@ If COMP or STD is non-nil, put that in the units table instead." (mapcar 'math-remove-units (cdr expr)))))) (defun math-extract-units (expr) - (if (memq (car-safe expr) '(* /)) - (cons (car expr) - (mapcar 'math-extract-units (cdr expr))) - (if (math-check-unit-name expr) expr 1))) + (cond + ((memq (car-safe expr) '(* /)) + (cons (car expr) + (mapcar 'math-extract-units (cdr expr)))) + ((and + (eq (car-safe expr) '^) + (math-check-unit-name (nth 1 expr))) + expr) + ((math-check-unit-name expr) expr) + (t 1))) (defun math-build-units-table-buffer (enter-buffer) (if (not (and math-units-table math-units-table-buffer-valid diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index c30ccf3315e..c04e68c0cfa 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -267,15 +267,17 @@ first will be printed into the backtrace buffer." ;; Make sure we unbind buffer-read-only in the right buffer. (save-excursion (recursive-edit)))) + (when (and (window-live-p debugger-window) + (eq (window-buffer debugger-window) debugger-buffer)) + ;; Record height of debugger window. + (setq debugger-previous-window-height + (window-total-size debugger-window))) (if debugger-will-be-back ;; Restore previous window configuration (Bug#12623). (set-window-configuration window-configuration) (when (and (window-live-p debugger-window) (eq (window-buffer debugger-window) debugger-buffer)) (progn - ;; Record height of debugger window. - (setq debugger-previous-window-height - (window-total-size debugger-window)) ;; Unshow debugger-buffer. (quit-restore-window debugger-window debugger-bury-or-kill) ;; Restore current buffer (Bug#12502). diff --git a/lisp/frame.el b/lisp/frame.el index b7b61bcc576..7a54efc23e7 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -655,6 +655,8 @@ the new frame according to its own rules." (error "Don't know how to create a frame on window system %s" w)) (unless (get w 'window-system-initialized) + (unless x-display-name + (setq x-display-name display)) (funcall (cdr (assq w window-system-initialization-alist))) (put w 'window-system-initialized t)) diff --git a/lisp/loadup.el b/lisp/loadup.el index e0f5c6265b9..e5f2cb014d3 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -38,7 +38,8 @@ ;; doc strings in the dumped Emacs.) Because of this: ;; ii) If the file is loaded uncompiled, it should (where possible) -;; obey the doc-string conventions expected by make-docfile. +;; obey the doc-string conventions expected by make-docfile. It +;; should also be added to the uncompiled[] list in make-docfile.c. ;;; Code: diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f464b42182d..f865a0269d4 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1134,7 +1134,23 @@ Repeated uses step through the possible completions." ;; through the previous possible completions. (let ((last (last all))) (setcdr last (cons (car all) (cdr last))) - (completion--cache-all-sorted-completions (cdr all))))))) + (completion--cache-all-sorted-completions (cdr all))) + ;; Make sure repeated uses cycle, even though completion--done might + ;; have added a space or something that moved us outside of the field. + ;; (bug#12221). + (let* ((table minibuffer-completion-table) + (pred minibuffer-completion-predicate) + (extra-prop completion-extra-properties) + (cmd + (lambda () "Cycle through the possible completions." + (interactive) + (let ((completion-extra-properties extra-prop)) + (completion-in-region start (point) table pred))))) + (set-temporary-overlay-map + (let ((map (make-sparse-keymap))) + (define-key map [remap completion-at-point] cmd) + (define-key map (vector last-command-event) cmd) + map))))))) (defvar minibuffer-confirm-exit-commands '(completion-at-point minibuffer-complete @@ -1557,7 +1573,6 @@ variables.") (let* ((exit-fun (plist-get completion-extra-properties :exit-function)) (pre-msg (and exit-fun (current-message)))) (cl-assert (memq finished '(exact sole finished unknown))) - ;; FIXME: exit-fun should receive `finished' as a parameter. (when exit-fun (when (eq finished 'unknown) (setq finished diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 26d4a399c2d..2614af9ffa4 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1535,10 +1535,11 @@ if ARG is omitted or nil." (error "Invalid file-name")) (or prefix (setq prefix "flymake")) - (let* ((temp-name (concat (file-name-sans-extension file-name) - "_" prefix - (and (file-name-extension file-name) - (concat "." (file-name-extension file-name)))))) + (let* ((ext (file-name-extension file-name)) + (temp-name (file-truename + (concat (file-name-sans-extension file-name) + "_" prefix + (and ext (concat "." ext)))))) (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) temp-name)) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 59c419abfc3..805ffa36e4e 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1516,9 +1516,9 @@ this trigger is subscribed to `gdb-buf-publisher' and called with (comint-exec io-buffer "gdb-inferior" nil nil nil) (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) -(defvar gdb-display-buffer-other-frame-action - `((display-buffer-reuse-window display-buffer-pop-up-frame) - (reusable-frames . 0) +(defcustom gdb-display-buffer-other-frame-action + '((display-buffer-reuse-window display-buffer-pop-up-frame) + (reusable-frames . visible) (inhibit-same-window . t) (pop-up-frame-parameters (height . 14) (width . 80) @@ -1526,8 +1526,11 @@ this trigger is subscribed to `gdb-buf-publisher' and called with (tool-bar-lines . nil) (menu-bar-lines . nil) (minibuffer . nil))) - "A `display-buffer' action for displaying GDB utility frames.") -(put 'gdb-display-buffer-other-frame-action 'risky-local-variable t) + "`display-buffer' action for displaying GDB utility frames." + :group 'gdb + :type display-buffer--action-custom-type + :risky t + :version "24.3") (defun gdb-frame-io-buffer () "Display IO of debugged program in another frame." @@ -4175,9 +4178,9 @@ buffers, if required." (if gdb-many-windows (gdb-setup-windows) (gdb-get-buffer-create 'gdb-breakpoints-buffer) - (if (and gdb-show-main gdb-main-file) - (let ((pop-up-windows t)) - (display-buffer (gud-find-file gdb-main-file))))) + (and gdb-show-main + gdb-main-file + (display-buffer (gud-find-file gdb-main-file)))) (gdb-force-mode-line-update (propertize "ready" 'face font-lock-variable-name-face))) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 2e3858b2cc5..719471278a8 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -2700,42 +2700,39 @@ Obeying it means displaying in another window the specified file and line." (gud-find-file true-file))) (window (and buffer (or (get-buffer-window buffer) - (if (eq gud-minor-mode 'gdbmi) - (display-buffer buffer nil 'visible)) (display-buffer buffer)))) (pos)) - (if buffer - (progn - (with-current-buffer buffer - (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) - (if (yes-or-no-p - (format "File %s changed on disk. Reread from disk? " - (buffer-name))) - (revert-buffer t t) - (setq gud-keep-buffer t))) - (save-restriction - (widen) - (goto-char (point-min)) - (forward-line (1- line)) - (setq pos (point)) - (or gud-overlay-arrow-position - (setq gud-overlay-arrow-position (make-marker))) - (set-marker gud-overlay-arrow-position (point) (current-buffer)) - ;; If they turned on hl-line, move the hl-line highlight to - ;; the arrow's line. - (when (featurep 'hl-line) - (cond - (global-hl-line-mode - (global-hl-line-highlight)) - ((and hl-line-mode hl-line-sticky-flag) - (hl-line-highlight))))) - (cond ((or (< pos (point-min)) (> pos (point-max))) - (widen) - (goto-char pos)))) - (when window - (set-window-point window gud-overlay-arrow-position) - (if (eq gud-minor-mode 'gdbmi) - (setq gdb-source-window window))))))) + (when buffer + (with-current-buffer buffer + (unless (or (verify-visited-file-modtime buffer) gud-keep-buffer) + (if (yes-or-no-p + (format "File %s changed on disk. Reread from disk? " + (buffer-name))) + (revert-buffer t t) + (setq gud-keep-buffer t))) + (save-restriction + (widen) + (goto-char (point-min)) + (forward-line (1- line)) + (setq pos (point)) + (or gud-overlay-arrow-position + (setq gud-overlay-arrow-position (make-marker))) + (set-marker gud-overlay-arrow-position (point) (current-buffer)) + ;; If they turned on hl-line, move the hl-line highlight to + ;; the arrow's line. + (when (featurep 'hl-line) + (cond + (global-hl-line-mode + (global-hl-line-highlight)) + ((and hl-line-mode hl-line-sticky-flag) + (hl-line-highlight))))) + (cond ((or (< pos (point-min)) (> pos (point-max))) + (widen) + (goto-char pos)))) + (when window + (set-window-point window gud-overlay-arrow-position) + (if (eq gud-minor-mode 'gdbmi) + (setq gdb-source-window window)))))) ;; The gud-call function must do the right thing whether its invoking ;; keystroke is from the GUD buffer itself (via major-mode binding) diff --git a/src/ChangeLog b/src/ChangeLog index 65f1c086260..f61c2ccdb00 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2012-10-19 Kazuhiro Ito (tiny change) + + * font.c (Ffont_at): Fix previous change. + +2012-10-19 Eli Zaretskii + + * puresize.h (BASE_PURESIZE): Bump the base value to 1700000. See + http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html + for the reasons. + + * alloc.c (NSTATICS): Decrease to 0x800. + +2012-10-19 Stefan Monnier + + * fns.c (Fnreverse): Include the problem element when signalling an + error (bug#12677). + +2012-10-18 Jan Djärv + + * nsterm.m (ns_select): Check writefds before call to + FD_ISSET (Bug#12668). + 2012-10-18 Daniel Colascione * alloc.c (NSTATICS): Increase from 0x650 to 0x1000 diff --git a/src/alloc.c b/src/alloc.c index 08dc26784cc..5bb528c64ab 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -376,7 +376,7 @@ struct gcpro *gcprolist; /* Addresses of staticpro'd variables. Initialize it to a nonzero value; otherwise some compilers put it into BSS. */ -#define NSTATICS 0x1000 +#define NSTATICS 0x800 static Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; /* Index of next unused slot in staticvec. */ @@ -5030,7 +5030,7 @@ staticpro (Lisp_Object *varaddress) { staticvec[staticidx++] = varaddress; if (staticidx >= NSTATICS) - fatal ("NSTATICS too small. Try increasing and recompiling Emacs."); + fatal ("NSTATICS too small; try increasing and recompiling Emacs."); } diff --git a/src/coding.c b/src/coding.c index 412d7245223..7628a9fbf2e 100644 --- a/src/coding.c +++ b/src/coding.c @@ -415,7 +415,7 @@ enum iso_code_class_type ISO_shift_out, /* ISO_CODE_SO (0x0E) */ ISO_shift_in, /* ISO_CODE_SI (0x0F) */ ISO_single_shift_2_7, /* ISO_CODE_SS2_7 (0x19) */ - ISO_escape, /* ISO_CODE_SO (0x1B) */ + ISO_escape, /* ISO_CODE_ESC (0x1B) */ ISO_control_1, /* Control codes in the range 0x80..0x9F, except for the following 3 codes. */ diff --git a/src/fns.c b/src/fns.c index c999b5b08b9..b1ba5ce9509 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1689,7 +1689,7 @@ changing the value of a sequence `foo'. */) DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0, doc: /* Reverse LIST by modifying cdr pointers. -Return the reversed list. */) +Return the reversed list. Expects a properly nil-terminated list. */) (Lisp_Object list) { register Lisp_Object prev, tail, next; @@ -1700,7 +1700,7 @@ Return the reversed list. */) while (!NILP (tail)) { QUIT; - CHECK_LIST_CONS (tail, list); + CHECK_LIST_CONS (tail, tail); next = XCDR (tail); Fsetcdr (tail, prev); prev = tail; diff --git a/src/font.c b/src/font.c index 629e8bb977a..7cb4149ac4e 100644 --- a/src/font.c +++ b/src/font.c @@ -4775,7 +4775,7 @@ the current buffer. It defaults to the currently selected window. */) { CHECK_NUMBER (position); CHECK_STRING (string); - if (! (0 < XINT (position) && XINT (position) < SCHARS (string))) + if (! (0 <= XINT (position) && XINT (position) < SCHARS (string))) args_out_of_range (string, position); pos = XINT (position); } diff --git a/src/nsterm.m b/src/nsterm.m index dfc84db50f7..a4eaad47ac1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3443,10 +3443,10 @@ overwriting cursor (usually when cursor on a tab) */ /* NSTRACE (ns_select); */ - for (k = 0; readfds && k < nfds+1; k++) + for (k = 0; k < nfds+1; k++) { - if (FD_ISSET(k, readfds)) ++nr; - if (FD_ISSET(k, writefds)) ++nr; + if (readfds && FD_ISSET(k, readfds)) ++nr; + if (writefds && FD_ISSET(k, writefds)) ++nr; } if (NSApp == nil diff --git a/src/puresize.h b/src/puresize.h index 2f024345d61..26395a5729d 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -40,7 +40,7 @@ along with GNU Emacs. If not, see . */ #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (1620000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (1700000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */