Stop Rust source files from being made executable

Rust has an unfortunate syntax for setting attributes on a module file:

```rust
  #![...]
```

Since this is typically put at the top of the file, that makes the
shebang the first two characters, which makes the `after-save-hook`
function `executable-make-buffer-file-executable-if-script-p` function
change any such rust files executable.
This commit is contained in:
Geoff Shannon 2018-09-14 02:23:39 -07:00 committed by Bozhidar Batsov
parent e9590101d8
commit 598fdd8392

View file

@ -53,6 +53,8 @@
(defun prelude-rust-mode-defaults () (defun prelude-rust-mode-defaults ()
(local-set-key (kbd "C-c C-d") 'racer-describe) (local-set-key (kbd "C-c C-d") 'racer-describe)
;; Prevent #! from chmodding rust files to be executable
(remove-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
;; CamelCase aware editing operations ;; CamelCase aware editing operations
(subword-mode +1)) (subword-mode +1))