Now on revision 112566. ------------------------------------------------------------ revno: 112566 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-05-12 23:23:08 -0700 message: * configure.ac (LD_SWITCH_SYSTEM_EMACS): Fix typo in previous change. diff: === modified file 'ChangeLog' --- ChangeLog 2013-05-13 03:54:34 +0000 +++ ChangeLog 2013-05-13 06:23:08 +0000 @@ -1,6 +1,6 @@ 2013-05-13 Paul Eggert - * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -fno-pie. + * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -nopie. Reported privately by Han Boetes . 2013-05-08 Juanma Barranquero === modified file 'configure.ac' --- configure.ac 2013-05-13 03:54:34 +0000 +++ configure.ac 2013-05-13 06:23:08 +0000 @@ -1009,7 +1009,7 @@ ;; openbsd) - ## Han Boetes says this is necessary, + ## Han Boetes says this is necessary, ## otherwise Emacs dumps core on elf systems. LD_SWITCH_SYSTEM="-Z" ;; @@ -4273,7 +4273,7 @@ ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; - openbsd) LD_SWITCH_SYSTEM_TEMACS='-fno-pie' ;; + openbsd) LD_SWITCH_SYSTEM_TEMACS='-nopie' ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac ------------------------------------------------------------ revno: 112565 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-05-12 20:54:34 -0700 message: * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -fno-pie. Reported privately by Han Boetes . diff: === modified file 'ChangeLog' --- ChangeLog 2013-05-08 16:22:09 +0000 +++ ChangeLog 2013-05-13 03:54:34 +0000 @@ -1,3 +1,8 @@ +2013-05-13 Paul Eggert + + * configure.ac (LD_SWITCH_SYSTEM_TEMACS): OpenBSD needs -fno-pie. + Reported privately by Han Boetes . + 2013-05-08 Juanma Barranquero * lib/makefile.w32-in (ACL_H): New macro. === modified file 'configure.ac' --- configure.ac 2013-05-09 15:17:38 +0000 +++ configure.ac 2013-05-13 03:54:34 +0000 @@ -4273,6 +4273,8 @@ ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; + openbsd) LD_SWITCH_SYSTEM_TEMACS='-fno-pie' ;; + *) LD_SWITCH_SYSTEM_TEMACS= ;; esac ------------------------------------------------------------ revno: 112564 committer: Leo Liu branch nick: trunk timestamp: Mon 2013-05-13 09:36:42 +0800 message: * progmodes/octave.el (octave-mode-map): Bind octave-indent-defun to C-c C-q instead of C-M-q. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-13 00:07:18 +0000 +++ lisp/ChangeLog 2013-05-13 01:36:42 +0000 @@ -2,6 +2,8 @@ * progmodes/octave.el (octave-indent-comment): Fix the indentation of ### or %%%. + (octave-mode-map): Bind octave-indent-defun to C-c C-q instead of + C-M-q. 2013-05-12 Leo Liu === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-13 00:07:18 +0000 +++ lisp/progmodes/octave.el 2013-05-13 01:36:42 +0000 @@ -96,9 +96,10 @@ (defvar octave-mode-map (let ((map (make-sparse-keymap))) - (define-key map "\M-." 'octave-find-definition) - (define-key map "\e\n" 'octave-indent-new-comment-line) - (define-key map "\M-\C-q" 'octave-indent-defun) + (define-key map "\M-." 'octave-find-definition) + (define-key map "\M-\C-j" 'octave-indent-new-comment-line) + ;; C-c C-q is also used by cc modes for similar command + (define-key map "\C-c\C-q" 'octave-indent-defun) (define-key map "\C-c\C-p" 'octave-previous-code-line) (define-key map "\C-c\C-n" 'octave-next-code-line) (define-key map "\C-c\C-a" 'octave-beginning-of-line) ------------------------------------------------------------ revno: 112563 committer: Leo Liu branch nick: trunk timestamp: Mon 2013-05-13 08:07:18 +0800 message: * progmodes/octave.el (octave-indent-comment): Fix the indentation of ### or %%%. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-12 04:10:40 +0000 +++ lisp/ChangeLog 2013-05-13 00:07:18 +0000 @@ -1,3 +1,8 @@ +2013-05-13 Leo Liu + + * progmodes/octave.el (octave-indent-comment): Fix the indentation + of ### or %%%. + 2013-05-12 Leo Liu * progmodes/octave.el (inferior-octave-startup): Store the value === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-12 04:10:40 +0000 +++ lisp/progmodes/octave.el 2013-05-13 00:07:18 +0000 @@ -434,10 +434,13 @@ "A function for `smie-indent-functions' (which see)." (save-excursion (back-to-indentation) - (when (and (not (octave-in-string-or-comment-p)) - (looking-at-p "\\s<\\(?:[^{}]\\|$\\)") - (not (looking-at-p "\\s<\\s<"))) - (comment-choose-indent)))) + (cond + ((octave-in-string-or-comment-p) nil) + ((looking-at-p "\\s<\\{3,\\}") + 0) + ((and (looking-at-p "\\s<\\(?:[^{}]\\|$\\)") + (not (looking-at-p "\\s<\\s<"))) + (comment-choose-indent))))) (defvar octave-font-lock-keywords ------------------------------------------------------------ revno: 112562 fixes bug: http://debbugs.gnu.org/14345 committer: Paul Eggert branch nick: trunk timestamp: Sun 2013-05-12 12:17:04 -0700 message: * image.c (gif_load): Check that subimages fit. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-09 18:30:46 +0000 +++ src/ChangeLog 2013-05-12 19:17:04 +0000 @@ -1,3 +1,7 @@ +2013-05-12 Paul Eggert + + * image.c (gif_load): Check that subimages fit (Bug#14345). + 2013-05-09 Stefan Monnier * lread.c (skip_dyn_eof): New function. === modified file 'src/image.c' --- src/image.c 2013-04-07 04:41:19 +0000 +++ src/image.c 2013-05-12 19:17:04 +0000 @@ -7263,6 +7263,25 @@ return 0; } + /* Check that the selected subimages fit. It's not clear whether + the GIF spec requires this, but Emacs can crash if they don't fit. */ + for (j = 0; j <= idx; ++j) + { + struct SavedImage *subimage = gif->SavedImages + j; + int subimg_width = subimage->ImageDesc.Width; + int subimg_height = subimage->ImageDesc.Height; + int subimg_top = subimage->ImageDesc.Top; + int subimg_left = subimage->ImageDesc.Left; + if (! (0 <= subimg_width && 0 <= subimg_height + && 0 <= subimg_top && subimg_top <= height - subimg_height + && 0 <= subimg_left && subimg_left <= width - subimg_width)) + { + image_error ("Subimage does not fit in image", Qnil, Qnil); + fn_DGifCloseFile (gif); + return 0; + } + } + /* Create the X image and pixmap. */ if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap)) { ------------------------------------------------------------ revno: 112561 committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-05-12 06:22:44 -0400 message: Auto-commit of loaddefs files. diff: === modified file 'lisp/emulation/tpu-edt.el' --- lisp/emulation/tpu-edt.el 2013-01-01 12:22:35 +0000 +++ lisp/emulation/tpu-edt.el 2013-05-12 10:22:44 +0000 @@ -2440,7 +2440,7 @@ ;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins -;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "fcc961b0b1e88f7fc9018b02742c27a8") +;;;;;; tpu-cursor-free-mode) "tpu-extras" "tpu-extras.el" "ae3bca6f21640b5713a7c58c40f30847") ;;; Generated autoloads from tpu-extras.el (autoload 'tpu-cursor-free-mode "tpu-extras" "\ ------------------------------------------------------------ revno: 112560 committer: Leo Liu branch nick: trunk timestamp: Sun 2013-05-12 12:10:40 +0800 message: * progmodes/octave.el (inferior-octave-startup): Store the value of __octave_srcdir__ for octave-source-directories. (inferior-octave-check-process): New function refactored out of inferior-octave-send-list-and-digest. (octave-source-directories) (octave-find-definition-filename-function): New variables. (octave-source-directories) (octave-find-definition-default-filename): New functions. (octave-find-definition): Improve to find functions implemented in C++. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-12 01:34:30 +0000 +++ lisp/ChangeLog 2013-05-12 04:10:40 +0000 @@ -1,3 +1,15 @@ +2013-05-12 Leo Liu + + * progmodes/octave.el (inferior-octave-startup): Store the value + of __octave_srcdir__ for octave-source-directories. + (inferior-octave-check-process): New function refactored out of + inferior-octave-send-list-and-digest. + (octave-source-directories) + (octave-find-definition-filename-function): New variables. + (octave-source-directories) + (octave-find-definition-default-filename): New functions. + (octave-find-definition): Improve to find functions implemented in C++. + 2013-05-12 Glenn Morris * calendar/diary-lib.el (diary-outlook-format-1): === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-05-11 13:22:06 +0000 +++ lisp/progmodes/octave.el 2013-05-12 04:10:40 +0000 @@ -736,6 +736,10 @@ (car inferior-octave-output-list)) (inferior-octave-send-list-and-digest (list "PS2 (\"> \");\n"))) + (inferior-octave-send-list-and-digest + (list "if exist(\"__octave_srcdir__\") disp(__octave_srcdir__) endif\n")) + (process-put proc 'octave-srcdir (car inferior-octave-output-list)) + ;; O.K., now we are ready for the Inferior Octave startup commands. (inferior-octave-send-list-and-digest (list "more off;\n" @@ -762,7 +766,7 @@ (defvar inferior-octave-completion-table ;; - ;; Use cache to avod repetitive computation of completions due to + ;; Use cache to avoid repetitive computation of completions due to ;; bug#11906 - http://debbugs.gnu.org/11906 - which may cause ;; noticeable delay. CACHE: (CMD TIME VALUE). (let ((cache)) @@ -837,14 +841,17 @@ (setq inferior-octave-receive-in-progress nil)) (setq inferior-octave-output-string string)) +(defun inferior-octave-check-process () + (or (and inferior-octave-process + (process-live-p inferior-octave-process)) + (error (substitute-command-keys + "No inferior octave process running. Type \\[run-octave]")))) + (defun inferior-octave-send-list-and-digest (list) "Send LIST to the inferior Octave process and digest the output. The elements of LIST have to be strings and are sent one by one. All output is passed to the filter `inferior-octave-output-digest'." - (or (and inferior-octave-process - (process-live-p inferior-octave-process)) - (error (substitute-command-keys - "No inferior octave process running. Type \\[run-octave]"))) + (inferior-octave-check-process) (let* ((proc inferior-octave-process) (filter (process-filter proc)) string) @@ -1615,16 +1622,50 @@ (match-end 0) :type 'octave-help-function)))))))) -(defcustom octave-binary-file-extensions '("oct" "mex") - "A list of binary file extensions for Octave." - :type '(repeat string) +(defcustom octave-source-directories nil + "A list of directories for Octave sources." + :type '(repeat directory) :group 'octave :version "24.4") +(defun octave-source-directories () + (inferior-octave-check-process) + (let ((srcdir (process-get inferior-octave-process 'octave-srcdir))) + (if srcdir + (cons srcdir octave-source-directories) + octave-source-directories))) + +(defvar octave-find-definition-filename-function + #'octave-find-definition-default-filename) + +(defun octave-find-definition-default-filename (name) + "Default value for `octave-find-definition-filename-function'." + (pcase (file-name-extension name) + (`"oct" + (octave-find-definition-default-filename + (concat "libinterp/dldfcn/" + (file-name-sans-extension (file-name-nondirectory name)) + ".cc"))) + (`"cc" + (let ((file (or (locate-file name (octave-source-directories)) + (locate-file (file-name-nondirectory name) + (octave-source-directories))))) + (or (and file (file-exists-p file)) + (error "File `%s' not found" name)) + file)) + (`"mex" + (if (yes-or-no-p (format "File `%s' may be binary; open? " + (file-name-nondirectory name))) + name + (user-error "Aborted"))) + (t name))) + (defvar find-tag-marker-ring) (defun octave-find-definition (fn) - "Find the definition of FN." + "Find the definition of FN. +Definitions for functions implemented in C++ can be found if +`octave-source-directories' is set correctly." (interactive (list (octave-completing-read))) (inferior-octave-send-list-and-digest ;; help NAME is more verbose @@ -1636,15 +1677,11 @@ (match-string 1 line)))) (if (not file) (user-error "%s" (or line (format "`%s' not found" fn))) - (when (and (member (file-name-extension file) - octave-binary-file-extensions) - (not (yes-or-no-p (format "File `%s' may be binary; open? " - (file-name-nondirectory file))))) - (error "Aborted")) (require 'etags) (ring-insert find-tag-marker-ring (point-marker)) - (find-file file) - (octave-goto-function-definition)))) + (find-file (funcall octave-find-definition-filename-function file)) + (or (octave-goto-function-definition) + (forward-comment (point-max)))))) (provide 'octave)