diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rwxr-xr-x | autogen/configure | 49 | ||||
| -rw-r--r-- | configure.ac | 30 | ||||
| -rw-r--r-- | lisp/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/emacs-lisp/tabulated-list.el | 11 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 33 | ||||
| -rw-r--r-- | lisp/textmodes/remember.el | 3 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lisp.h | 6 |
9 files changed, 137 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog index 5f74726a743..cf1d4f0d54e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-04-26 Paul Eggert <eggert@cs.ucla.edu> + + Port better to AIX (Bug#14258). + * configure.ac (CFLAGS): Append -O if the user did not specify CFLAGS, + we did not already infer an optimization option, and -O works. + AIX xlc needs -O, otherwise garbage collection doesn't work. + 2013-04-22 Paul Eggert <eggert@cs.ucla.edu> * make-dist: Do not distribute admin/unidata/Makefile. diff --git a/autogen/configure b/autogen/configure index 7ddac01fb10..bd900b5afef 100755 --- a/autogen/configure +++ b/autogen/configure @@ -7271,10 +7271,10 @@ esac # Code from module xalloc-oversized: -# It's helpful to have C macros available to GDB, so prefer -g3 to -g -# if -g3 works and the user does not specify CFLAGS. -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. if test "$ac_test_CFLAGS" != set; then + # It's helpful to have C macros available to GDB, so prefer -g3 to -g + # if -g3 works and the user does not specify CFLAGS. + # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. case $CFLAGS in '-g') emacs_g3_CFLAGS='-g3';; @@ -7312,12 +7312,49 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5 $as_echo "$emacs_cv_prog_cc_g3" >&6; } - if test $emacs_cv_prog_cc_g3 = yes; then - CFLAGS=$emacs_g3_CFLAGS - else + if test $emacs_cv_prog_cc_g3 != yes; then CFLAGS=$emacs_save_CFLAGS fi fi + + case $CFLAGS in + *-O*) ;; + *) + # No optimization flag was inferred for this non-GCC compiler. + # Try -O. This is needed for xlc on AIX; see Bug#14258. + emacs_save_CFLAGS=$CFLAGS + test -z "$CFLAGS" || CFLAGS="$CFLAGS " + CFLAGS=${CFLAGS}-O + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5 +$as_echo_n "checking whether $CC accepts -O... " >&6; } +if test "${emacs_cv_prog_cc_o+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + emacs_cv_prog_cc_o=yes +else + emacs_cv_prog_cc_o=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5 +$as_echo "$emacs_cv_prog_cc_o" >&6; } + if test $emacs_cv_prog_cc_o != yes; then + CFLAGS=$emacs_save_CFLAGS + fi ;; + esac fi # Check whether --enable-gcc-warnings was given. diff --git a/configure.ac b/configure.ac index 2b3afc1fb80..6c59dcaa7e3 100644 --- a/configure.ac +++ b/configure.ac @@ -613,10 +613,10 @@ AC_DEFUN([gl_THREADLIB]) dnl Amongst other things, this sets AR and ARFLAGS. gl_EARLY -# It's helpful to have C macros available to GDB, so prefer -g3 to -g -# if -g3 works and the user does not specify CFLAGS. -# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. if test "$ac_test_CFLAGS" != set; then + # It's helpful to have C macros available to GDB, so prefer -g3 to -g + # if -g3 works and the user does not specify CFLAGS. + # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains. case $CFLAGS in '-g') emacs_g3_CFLAGS='-g3';; @@ -632,13 +632,29 @@ if test "$ac_test_CFLAGS" != set; then [emacs_cv_prog_cc_g3], [AC_LINK_IFELSE([AC_LANG_PROGRAM()], [emacs_cv_prog_cc_g3=yes], - [emacs_cv_prog_cc_g3=no])]) - if test $emacs_cv_prog_cc_g3 = yes; then - CFLAGS=$emacs_g3_CFLAGS - else + [emacs_cv_prog_cc_g3=no])]) + if test $emacs_cv_prog_cc_g3 != yes; then CFLAGS=$emacs_save_CFLAGS fi fi + + case $CFLAGS in + *-O*) ;; + *) + # No optimization flag was inferred for this non-GCC compiler. + # Try -O. This is needed for xlc on AIX; see Bug#14258. + emacs_save_CFLAGS=$CFLAGS + test -z "$CFLAGS" || CFLAGS="$CFLAGS " + CFLAGS=${CFLAGS}-O + AC_CACHE_CHECK([whether $CC accepts -O], + [emacs_cv_prog_cc_o], + [AC_LINK_IFELSE([AC_LANG_PROGRAM()], + [emacs_cv_prog_cc_o=yes], + [emacs_cv_prog_cc_o=no])]) + if test $emacs_cv_prog_cc_o != yes; then + CFLAGS=$emacs_save_CFLAGS + fi ;; + esac fi AC_ARG_ENABLE([gcc-warnings], diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 340dc41a744..30c49c942c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2013-04-26 Reuben Thomas <rrt@sc3d.org> + + * textmodes/remember.el (remember-store-in-files): Document that + the file name format is passed to `format-time-string'. + +2013-04-26 Leo Liu <sdl.web@gmail.com> + + * progmodes/octave.el (octave-sync-function-file-names): New function. + (octave-mode): Use it in before-save-hook. + +2013-04-26 Stefan Monnier <monnier@iro.umontreal.ca> + + * emacs-lisp/tabulated-list.el (tabulated-list-mode): Disable undo + (bug#14274). + + * progmodes/octave.el (octave-smie-forward-token): Properly skip + \n and comment, even if it's not an implicit ; (bug#14218). + 2013-04-26 Glenn Morris <rgm@gnu.org> * subr.el (read-number): Once more use `read' rather than @@ -20,7 +38,7 @@ * progmodes/octave.el (octave-submit-bug-report): Obsolete. (octave-mode, inferior-octave-mode): Use setq-local. - (octave-not-in-string-or-comment-p): Renamed to + (octave-not-in-string-or-comment-p): Rename to octave-in-string-or-comment-p. (octave-in-comment-p, octave-in-string-p) (octave-in-string-or-comment-p): Replace defsubst with defun. @@ -36,8 +54,8 @@ 2013-04-25 Leo Liu <sdl.web@gmail.com> - * progmodes/octave.el (octave-completion-at-point-function): Make - use of inferior octave process. + * progmodes/octave.el (octave-completion-at-point-function): + Make use of inferior octave process. (octave-initialize-completions): Remove. (inferior-octave-completion-table): New function. (inferior-octave-completion-at-point): Use it. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index da487e463e2..6dba423010f 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -519,12 +519,11 @@ printer is `tabulated-list-print-entry', but a mode that keeps data in an ewoc may instead specify a printer function (e.g., one that calls `ewoc-enter-last'), with `tabulated-list-print-entry' as the ewoc pretty-printer." - (setq truncate-lines t) - (setq buffer-read-only t) - (set (make-local-variable 'revert-buffer-function) - 'tabulated-list-revert) - (set (make-local-variable 'glyphless-char-display) - tabulated-list-glyphless-char-display)) + (setq-local truncate-lines t) + (setq-local buffer-read-only t) + (setq-local buffer-undo-list t) + (setq-local revert-buffer-function #'tabulated-list-revert) + (setq-local glyphless-char-display tabulated-list-glyphless-char-display)) (put 'tabulated-list-mode 'mode-class 'special) diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 640775bfe8b..f8b9e4f6fab 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -461,11 +461,12 @@ Non-nil means always go to the next Octave code line after sending." (forward-comment 1)) (cond ((and (looking-at "$\\|[%#]") - (not (smie-rule-bolp)) - ;; Ignore it if it's within parentheses. - (prog1 (let ((ppss (syntax-ppss))) - (not (and (nth 1 ppss) - (eq ?\( (char-after (nth 1 ppss)))))) + ;; Ignore it if it's within parentheses or if the newline does not end + ;; some preceding text. + (prog1 (and (not (smie-rule-bolp)) + (let ((ppss (syntax-ppss))) + (not (and (nth 1 ppss) + (eq ?\( (char-after (nth 1 ppss))))))) (forward-comment (point-max)))) ;; Why bother distinguishing \n and ;? ";") ;;"\n" @@ -625,6 +626,7 @@ including a reproducible test case and send the message." (add-hook 'completion-at-point-functions 'octave-completion-at-point-function nil t) + (add-hook 'before-save-hook 'octave-sync-function-file-names nil t) (setq-local beginning-of-defun-function 'octave-beginning-of-defun) (easy-menu-add octave-mode-menu)) @@ -1007,6 +1009,27 @@ directory and makes this the current buffer's default directory." nil (delete-horizontal-space) (insert (concat " " octave-continuation-string)))) + +(defun octave-sync-function-file-names () + "Ensure function name agree with function file name. +See Info node `(octave)Function Files'." + (interactive) + (save-excursion + (when (and buffer-file-name + (prog2 + (goto-char (point-min)) + (equal (funcall smie-forward-token-function) "function") + (forward-word -1))) + (let ((file (file-name-sans-extension + (file-name-nondirectory buffer-file-name))) + (func (and (re-search-forward octave-function-header-regexp nil t) + (match-string 3)))) + (when (and func + (not (equal file func)) + (yes-or-no-p + "Function name different from file name. Fix? ")) + (replace-match file nil nil nil 3)))))) + ;;; Indentation diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index 76ffeaf30be..c8bafd8176a 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -444,7 +444,8 @@ If you want to remember a region, supply a universal prefix to (defun remember-store-in-files () "Store remember data in a file in `remember-data-directory'. -The file is named after `remember-directory-file-name-format'." +The file is named after `remember-directory-file-name-format' fed through +`format-time-string'." (let ((name (format-time-string remember-directory-file-name-format (current-time))) (text (buffer-string))) diff --git a/src/ChangeLog b/src/ChangeLog index 5dd113775d9..d649c1bcdbc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,11 @@ * font.c (font_open_entity): Always open a font of manageable size. +2013-04-26 Paul Eggert <eggert@cs.ucla.edu> + Port better to AIX (Bug#14258). + * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too, + to pacify AIX xlc. + 2013-04-24 Kenichi Handa <handa@gnu.org> * coding.c (decode_coding_iso_2022): When an invalid escape diff --git a/src/lisp.h b/src/lisp.h index bcb866b4cc4..e2c24eed352 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -231,9 +231,9 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 }; #define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 #define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0) -/* Stolen from GDB. The only known compiler that doesn't support - enums in bitfields is MSVC. */ -#ifdef _MSC_VER +/* Idea stolen from GDB. MSVC doesn't support enums in bitfields, + and xlc complains vociferously about them. */ +#if defined _MSC_VER || defined __IBMC__ #define ENUM_BF(TYPE) unsigned int #else #define ENUM_BF(TYPE) enum TYPE |
